@contember/schema
Advanced tools
Comparing version 1.2.0-beta.3 to 1.2.0-rc.1
@@ -149,11 +149,12 @@ import { Value } from './value'; | ||
type ComposedWhere<C, Opt = never> = { | ||
readonly and?: readonly (Where<C, Opt> | Opt)[]; | ||
readonly or?: readonly (Where<C, Opt> | Opt)[]; | ||
readonly not?: Where<C, Opt>; | ||
readonly and?: (readonly (Where<C, Opt> | Opt)[]) | Opt; | ||
readonly or?: (readonly (Where<C, Opt> | Opt)[]) | Opt; | ||
readonly not?: Where<C, Opt> | Opt; | ||
}; | ||
interface FieldWhere<C = Condition, Opt = never> { | ||
readonly [name: string]: C | Where<C, Opt> | readonly (Where<C, Opt> | Opt)[]; | ||
readonly [name: string]: Opt | C | Where<C, Opt> | readonly (Where<C, Opt> | Opt)[]; | ||
} | ||
type Where<C = Condition, Opt = never> = ComposedWhere<C, Opt> & FieldWhere<C, Opt>; | ||
type OptionalWhere<E = never> = Where<Condition<Value.FieldValue<E>>, null | undefined>; | ||
type OptionalFieldWhere<E = never> = FieldWhere<Condition<Value.FieldValue<E>>, null | undefined>; | ||
enum FieldMeta { | ||
@@ -160,0 +161,0 @@ readable = "readable", |
{ | ||
"name": "@contember/schema", | ||
"version": "1.2.0-beta.3", | ||
"version": "1.2.0-rc.1", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -184,9 +184,9 @@ import { Value } from './value' | ||
export type ComposedWhere<C, Opt = never> = { | ||
readonly and?: readonly (Where<C, Opt> | Opt)[] | ||
readonly or?: readonly (Where<C, Opt> | Opt)[] | ||
readonly not?: Where<C, Opt> | ||
readonly and?: (readonly (Where<C, Opt> | Opt)[]) | Opt | ||
readonly or?: (readonly (Where<C, Opt> | Opt)[]) | Opt | ||
readonly not?: Where<C, Opt> | Opt | ||
} | ||
export interface FieldWhere<C = Condition, Opt = never> { | ||
readonly [name: string]: C | Where<C, Opt> | readonly (Where<C, Opt> | Opt)[] //last one if for ComposedWhere | ||
readonly [name: string]: Opt | C | Where<C, Opt> | readonly (Where<C, Opt> | Opt)[] //last one if for ComposedWhere | ||
} | ||
@@ -197,2 +197,3 @@ | ||
export type OptionalWhere<E = never> = Where<Condition<Value.FieldValue<E>>, null | undefined> | ||
export type OptionalFieldWhere<E = never> = FieldWhere<Condition<Value.FieldValue<E>>, null | undefined> | ||
@@ -199,0 +200,0 @@ export enum FieldMeta { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
115256
1594