@dangreaves/groq-query-builder
Advanced tools
Comparing version 0.19.1 to 0.19.2
@@ -112,19 +112,15 @@ import * as _sinclair_typebox from '@sinclair/typebox'; | ||
*/ | ||
type TProjection<T extends TProperties = TProperties, O extends TProjectionOptions = TProjectionOptions> = O["greedy"] extends true ? TIntersect<[TObject<T>, typeof GreedySchema]> : TObject<T>; | ||
type TProjection<T extends TProperties = TProperties, O extends TProjectionOptions | undefined = any> = O extends TProjectionOptions ? O["greedy"] extends true ? TIntersect<[TObject<T>, typeof GreedySchema]> : TObject<T> : TObject<T>; | ||
/** | ||
* Union of potential projection schemas. | ||
*/ | ||
type TProjectionUnion = TIntersect<[TObject<TProperties>, typeof GreedySchema]> | TObject<TProperties>; | ||
/** | ||
* Fetch a single object projection. | ||
*/ | ||
declare function Projection<T extends TProperties = TProperties, O extends TProjectionOptions = TProjectionOptions>(properties: T, options?: O): TProjection<T, O>; | ||
declare function Projection<T extends TProperties = TProperties, O extends TProjectionOptions | undefined = undefined>(properties: T, options?: O): TProjection<T, O>; | ||
/** | ||
* Return true if the given value is a projection. | ||
*/ | ||
declare function isProjection(value: unknown): value is TProjectionUnion; | ||
declare function isProjection(value: unknown): value is TProjection; | ||
/** | ||
* Serialize a projection. | ||
*/ | ||
declare function serializeProjection(_schema: TProjectionUnion): string; | ||
declare function serializeProjection(_schema: TProjection): string; | ||
/** | ||
@@ -169,7 +165,7 @@ * Filter a projection. | ||
*/ | ||
type TTypedProjection<T extends PropertiesWithType = PropertiesWithType, O extends TProjectionOptions = TProjectionOptions> = TProjection<T, O>; | ||
type TTypedProjection<T extends PropertiesWithType = PropertiesWithType, O extends TProjectionOptions | undefined = any> = TProjection<T, O>; | ||
/** | ||
* Fetch a projection with required _type attribute. | ||
*/ | ||
declare function TypedProjection<T extends PropertiesWithType = PropertiesWithType, O extends TProjectionOptions = TProjectionOptions>(properties: T, options?: O): TTypedProjection<T, O>; | ||
declare function TypedProjection<T extends PropertiesWithType = PropertiesWithType, O extends TProjectionOptions | undefined = undefined>(properties: T, options?: O): TTypedProjection<T, O>; | ||
@@ -176,0 +172,0 @@ /** |
{ | ||
"name": "@dangreaves/groq-query-builder", | ||
"version": "0.19.1", | ||
"version": "0.19.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
49051
988