@magnetarjs/types
Advanced tools
Comparing version 0.7.0 to 0.7.1
{ | ||
"name": "@magnetarjs/types", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "description": "Magnetar shared types", |
@@ -11,3 +11,6 @@ import { | ||
export type CollectionInstance<DocDataType extends Record<string, any> = Record<string, any>> = { | ||
export type CollectionInstance< | ||
DocDataType extends Record<string, any> = Record<string, any>, | ||
GranularTypes extends { insert: Record<string, any> } = { insert: DocDataType } | ||
> = { | ||
/** | ||
@@ -22,3 +25,3 @@ * The cached data that was written or read so far | ||
*/ | ||
doc: DocFn<DocDataType> | ||
doc: DocFn<DocDataType, GranularTypes> | ||
/** | ||
@@ -68,3 +71,3 @@ * The id of the collection. When this is a nested collection, it will not include the full path, only the final part | ||
*/ | ||
insert: MagnetarInsertAction<DocDataType> | ||
insert: MagnetarInsertAction<GranularTypes['insert']> | ||
/** | ||
@@ -71,0 +74,0 @@ * @see {@link MagnetarDeleteAction} |
@@ -11,3 +11,6 @@ import { | ||
export type DocInstance<DocDataType extends Record<string, any> = Record<string, any>> = { | ||
export type DocInstance< | ||
DocDataType extends Record<string, any> = Record<string, any>, | ||
GranularTypes extends { insert: Record<string, any> } = { insert: DocDataType } | ||
> = { | ||
/** | ||
@@ -59,3 +62,3 @@ * The cached data that was written or read so far | ||
*/ | ||
insert: MagnetarInsertAction<DocDataType> | ||
insert: MagnetarInsertAction<GranularTypes['insert']> | ||
/** | ||
@@ -62,0 +65,0 @@ * @see {@link MagnetarWriteAction} |
@@ -45,8 +45,9 @@ import { O } from 'ts-toolbelt' | ||
*/ | ||
export type CollectionFn<DocDataTypeInherited extends Record<string, any> = Record<string, any>> = < | ||
DocDataType extends Record<string, any> = DocDataTypeInherited | ||
>( | ||
export type CollectionFn< | ||
DocDataTypeInherited extends Record<string, any> = Record<string, any>, | ||
GranularTypes extends { insert: Record<string, any> } = { insert: DocDataTypeInherited } | ||
> = <DocDataType extends Record<string, any> = DocDataTypeInherited>( | ||
idOrPath: string, | ||
moduleConfig?: ModuleConfig | ||
) => CollectionInstance<DocDataType> | ||
) => CollectionInstance<DocDataType, GranularTypes> | ||
@@ -57,7 +58,8 @@ /** | ||
*/ | ||
export type DocFn<DocDataTypeInherited extends Record<string, any> = Record<string, any>> = < | ||
DocDataType extends Record<string, any> = DocDataTypeInherited | ||
>( | ||
export type DocFn< | ||
DocDataTypeInherited extends Record<string, any> = Record<string, any>, | ||
GranularTypes extends { insert: Record<string, any> } = { insert: DocDataTypeInherited } | ||
> = <DocDataType extends Record<string, any> = DocDataTypeInherited>( | ||
idOrPath: string, | ||
moduleConfig?: ModuleConfig | ||
) => DocInstance<DocDataType> | ||
) => DocInstance<DocDataType, GranularTypes> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41416
1034