Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graffy/core

Package Overview
Dependencies
Maintainers
0
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graffy/core - npm Package Compare versions

Comparing version 0.16.20-alpha.6 to 0.16.20-alpha.7

6

package.json

@@ -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;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc