@graffy/core
Advanced tools
Comparing version 0.16.20-alpha.6 to 0.16.20-alpha.7
@@ -5,3 +5,3 @@ { | ||
"author": "aravind (https://github.com/aravindet)", | ||
"version": "0.16.20-alpha.6", | ||
"version": "0.16.20-alpha.7", | ||
"main": "./index.cjs", | ||
@@ -20,6 +20,6 @@ "exports": { | ||
"dependencies": { | ||
"@graffy/common": "0.16.20-alpha.6", | ||
"@graffy/stream": "0.16.20-alpha.6", | ||
"@graffy/common": "0.16.20-alpha.7", | ||
"@graffy/stream": "0.16.20-alpha.7", | ||
"debug": "^4.3.7" | ||
} | ||
} |
@@ -18,3 +18,3 @@ export type AnyLeaf = string | number | boolean | null; | ||
| { $key: Key } | ||
| Record<string, AnyProjection> | ||
| { [key: string]: AnyProjection } | ||
| AnyProjection[]; | ||
@@ -41,7 +41,9 @@ | ||
// Generic one, when the path is not known at compile time. | ||
read<Q extends AnyProjection>( | ||
path: string | Key[], | ||
projection: Q, | ||
options?: GraffyReadOptions, | ||
): Promise<BlindReadResult<Q>>; | ||
// Should we have this? | ||
// | ||
// read<Q extends AnyProjection>( | ||
// path: string | Key[], | ||
// projection: Q, | ||
// options?: GraffyReadOptions, | ||
// ): Promise<BlindReadResult<Q>>; | ||
@@ -88,3 +90,5 @@ on: AnyFunction; | ||
: S extends AnyObject | ||
? Partial<{ [K in keyof S]: Project<S[K]> }> | boolean | ||
? 'string' extends keyof S // No named properties? | ||
? AnyProjection | ||
: Partial<{ [K in keyof S]: Project<S[K]> }> | boolean | ||
: never; | ||
@@ -109,13 +113,13 @@ | ||
// What can we tell about ReadResult when schema isn’t known? | ||
type BlindReadResult<Q> = Q extends Array<infer QItem> | ||
? ResultArray<BlindPlainReadResult<QItem>> | ||
: Q extends { $key: Key } | ||
? ResultArray<BlindPlainReadResult<Q>> | ||
: BlindPlainReadResult<Q>; | ||
// type BlindReadResult<Q> = Q extends Array<infer QItem> | ||
// ? ResultArray<BlindPlainReadResult<QItem>> | ||
// : Q extends { $key: Key } | ||
// ? ResultArray<BlindPlainReadResult<Q>> | ||
// : BlindPlainReadResult<Q>; | ||
// Ignore $key in Q | ||
type BlindPlainReadResult<Q> = Q extends AnyObject | ||
? { [K in keyof Q]: BlindReadResult<Q[K]> } | ||
: AnyValue; | ||
// // Ignore $key in Q | ||
// type BlindPlainReadResult<Q> = Q extends AnyObject | ||
// ? { [K in keyof Q]: BlindReadResult<Q[K]> } | ||
// : AnyValue; | ||
type GraffyReadOptions = AnyObject; |
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
24129
617
+ Added@graffy/common@0.16.20-alpha.7(transitive)
+ Added@graffy/stream@0.16.20-alpha.7(transitive)
- Removed@graffy/common@0.16.20-alpha.6(transitive)
- Removed@graffy/stream@0.16.20-alpha.6(transitive)