@effect/schema
Advanced tools
Comparing version 0.36.1 to 0.36.2
{ | ||
"name": "@effect/schema", | ||
"version": "0.36.1", | ||
"version": "0.36.2", | ||
"description": "Modeling the schema of data structures as first-class values", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -1419,8 +1419,8 @@ /** | ||
*/ | ||
export interface Class<A, Fields extends StructFields, Inherited = Data.Case> extends Schema<Simplify<FromStruct<Fields>>, A> { | ||
new (props: Simplify<ToStruct<Fields>>): ToStruct<Fields> & Omit<Inherited, keyof Fields>; | ||
readonly struct: Schema<Simplify<FromStruct<Fields>>, Simplify<ToStruct<Fields>>>; | ||
readonly extend: <B>() => <FieldsB extends StructFields>(fields: FieldsB) => Class<B, Omit<Fields, keyof FieldsB> & FieldsB, A>; | ||
readonly transform: <B>() => <FieldsB extends StructFields>(fields: FieldsB, decode: (input: Simplify<ToStruct<Fields>>) => ParseResult.ParseResult<ToStruct<Omit<Fields, keyof FieldsB> & FieldsB>>, encode: (input: Simplify<ToStruct<Omit<Fields, keyof FieldsB> & FieldsB>>) => ParseResult.ParseResult<ToStruct<Fields>>) => Class<B, Omit<Fields, keyof FieldsB> & FieldsB, A>; | ||
readonly transformFrom: <B>() => <FieldsB extends StructFields>(fields: FieldsB, decode: (input: Simplify<FromStruct<Fields>>) => ParseResult.ParseResult<FromStruct<Omit<Fields, keyof FieldsB> & FieldsB>>, encode: (input: Simplify<FromStruct<Omit<Fields, keyof FieldsB> & FieldsB>>) => ParseResult.ParseResult<FromStruct<Fields>>) => Class<B, Omit<Fields, keyof FieldsB> & FieldsB, A>; | ||
export interface Class<I, A, Self, Inherited = Data.Case> extends Schema<I, Self> { | ||
new (props: A): A & Omit<Inherited, keyof A>; | ||
readonly struct: Schema<I, A>; | ||
readonly extend: <Extended>() => <FieldsB extends StructFields>(fields: FieldsB) => Class<Simplify<Omit<I, keyof FieldsB> & FromStruct<FieldsB>>, Simplify<Omit<A, keyof FieldsB> & ToStruct<FieldsB>>, Extended, Self>; | ||
readonly transform: <Transformed>() => <FieldsB extends StructFields>(fields: FieldsB, decode: (input: A) => ParseResult.ParseResult<Omit<A, keyof FieldsB> & ToStruct<FieldsB>>, encode: (input: Simplify<Omit<A, keyof FieldsB> & ToStruct<FieldsB>>) => ParseResult.ParseResult<A>) => Class<I, Simplify<Omit<A, keyof FieldsB> & ToStruct<FieldsB>>, Transformed, Self>; | ||
readonly transformFrom: <Transformed>() => <FieldsB extends StructFields>(fields: FieldsB, decode: (input: I) => ParseResult.ParseResult<Omit<I, keyof FieldsB> & FromStruct<FieldsB>>, encode: (input: Simplify<Omit<I, keyof FieldsB> & FromStruct<FieldsB>>) => ParseResult.ParseResult<I>) => Class<I, Simplify<Omit<A, keyof FieldsB> & ToStruct<FieldsB>>, Transformed, Self>; | ||
} | ||
@@ -1431,3 +1431,3 @@ /** | ||
*/ | ||
export declare const Class: <A>() => <Fields extends StructFields>(fields: Fields) => Class<A, Fields, Data.Case>; | ||
export declare const Class: <Self>() => <Fields extends StructFields>(fields: Fields) => Class<Simplify<FromStruct<Fields>>, Simplify<ToStruct<Fields>>, Self, Data.Case>; | ||
//# sourceMappingURL=Schema.d.ts.map |
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
Sorry, the diff of this file is too big to display
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
1054223