Skip to content

Commit

Permalink
feat(void): add Void schema
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-alford committed Sep 20, 2023
1 parent 1163da7 commit f28cbe7
Show file tree
Hide file tree
Showing 87 changed files with 228 additions and 356 deletions.
2 changes: 1 addition & 1 deletion docs/Arbitrary.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Derive a fast-check arbitrary from a schemata-ts schema
**Signature**

```ts
export declare const deriveArbitrary: Interpreter<SchemableLambda>
export declare const deriveArbitrary: any
```

Added in v2.0.0
Expand Down
2 changes: 1 addition & 1 deletion docs/Eq.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Interprets a schema as an `Eq` instance.
**Signature**

```ts
export declare const deriveEq: Interpreter<I.SchemableLambda>
export declare const deriveEq: any
```

Added in v2.0.0
Expand Down
2 changes: 1 addition & 1 deletion docs/Guard.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Interprets a schema as a decoder
**Signature**

```ts
export declare const deriveGuard: Interpreter<I.SchemableLambda>
export declare const deriveGuard: any
```

Added in v2.0.0
Expand Down
96 changes: 17 additions & 79 deletions docs/JsonSchema.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export declare const annotate: (
| {
readonly title?: string | undefined
readonly description?: string | undefined
readonly references?: Readonly<Record<string, JsonSchema>> | undefined
readonly references?: Readonly<Record<string, any>> | undefined
readonly deprecated?: boolean | undefined
readonly readOnly?: boolean | undefined
}
Expand All @@ -73,10 +73,7 @@ Added in v1.2.0
**Signature**

```ts
export declare const array: (params?: {
minItems?: number
maxItems?: number
}) => <A>(items: Const<JsonSchema, A>) => Const<JsonSchema, A[]>
export declare const array: (params?: { minItems?: number; maxItems?: number }) => <A>(items: any) => any
```

Added in v1.2.0
Expand All @@ -86,7 +83,7 @@ Added in v1.2.0
**Signature**

```ts
export declare const booleanSchema: Const<JsonSchema, boolean>
export declare const booleanSchema: any
```

Added in v1.2.0
Expand All @@ -96,7 +93,7 @@ Added in v1.2.0
**Signature**

```ts
export declare const emptySchema: Const<I.JsonEmpty, never>
export declare const emptySchema: any
```

Added in v1.2.0
Expand All @@ -112,13 +109,7 @@ export declare const integer: <
>(params?: {
minimum?: Min | undefined
maximum?: Max | undefined
}) => Const<
JsonSchema,
Opaque<
number,
IntBrand<Min extends undefined ? -9007199254740991 : Min, Max extends undefined ? 9007199254740991 : Max>
>
>
}) => any
```

Added in v1.2.0
Expand All @@ -128,9 +119,7 @@ Added in v1.2.0
**Signature**

```ts
export declare const intersection: <B>(
right: Const<JsonSchema, B>
) => <A>(left: Const<JsonSchema, A>) => Const<JsonSchema, A & B>
export declare const intersection: <B>(right: any) => <A>(left: any) => any
```

Added in v1.2.0
Expand All @@ -140,7 +129,7 @@ Added in v1.2.0
**Signature**

```ts
export declare const literal: <A extends string | number | boolean | null>(value: A) => Const<JsonSchema, A>
export declare const literal: <A extends string | number | boolean | null>(value: A) => any
```

Added in v1.2.0
Expand All @@ -150,7 +139,7 @@ Added in v1.2.0
**Signature**

```ts
export declare const nullSchema: Const<I.JsonNull, never>
export declare const nullSchema: any
```

Added in v1.2.0
Expand All @@ -166,16 +155,7 @@ export declare const number: <
>(params?: {
minimum?: Min | undefined
maximum?: Max | undefined
}) => Const<
JsonSchema,
Opaque<
number,
FloatBrand<
Min extends undefined ? -1.7976931348623157e308 : Min,
Max extends undefined ? 1.7976931348623157e308 : Max
>
>
>
}) => any
```

Added in v1.2.0
Expand All @@ -185,27 +165,7 @@ Added in v1.2.0
**Signature**

```ts
export declare const record: <A>(
additionalProperties: Const<JsonSchema, A>,
propertyNames?:
| (I.JsonEmpty & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonString & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonNumber & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonBoolean & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonNull & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonInteger & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonConst & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonString & I.JsonConst & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonNumber & I.JsonConst & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonBoolean & I.JsonConst & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonNull & I.JsonConst & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonStruct & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonArray & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonUnion & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonIntersection & I.Description & I.References & I.Default & { readonly _A: string })
| (I.JsonRef & I.Description & I.References & I.Default & { readonly _A: string })
| undefined
) => Const<JsonSchema, Record<string, A>>
export declare const record: <A>(additionalProperties: any, propertyNames?: Const<JsonSchema, string>) => any
```

Added in v1.2.0
Expand All @@ -217,7 +177,7 @@ A reference to a schema definition
**Signature**

```ts
export declare const ref: <A>(ref: string) => Const<JsonSchema, A>
export declare const ref: <A>(ref: string) => any
```

Added in v2.0.0
Expand Down Expand Up @@ -246,28 +206,10 @@ Added in v1.2.0

```ts
export declare const struct: <A>(
properties: { [K in keyof A]: Const<JsonSchema, A[K]> },
properties: { [K in keyof A]: any },
required?: ReadonlyArray<string>,
additionalProperties?:
| false
| (I.JsonEmpty & I.Description & I.References & I.Default)
| (I.JsonString & I.Description & I.References & I.Default)
| (I.JsonNumber & I.Description & I.References & I.Default)
| (I.JsonBoolean & I.Description & I.References & I.Default)
| (I.JsonNull & I.Description & I.References & I.Default)
| (I.JsonInteger & I.Description & I.References & I.Default)
| (I.JsonConst & I.Description & I.References & I.Default)
| (I.JsonString & I.JsonConst & I.Description & I.References & I.Default)
| (I.JsonNumber & I.JsonConst & I.Description & I.References & I.Default)
| (I.JsonBoolean & I.JsonConst & I.Description & I.References & I.Default)
| (I.JsonNull & I.JsonConst & I.Description & I.References & I.Default)
| (I.JsonStruct & I.Description & I.References & I.Default)
| (I.JsonArray & I.Description & I.References & I.Default)
| (I.JsonUnion & I.Description & I.References & I.Default)
| (I.JsonIntersection & I.Description & I.References & I.Default)
| (I.JsonRef & I.Description & I.References & I.Default)
| undefined
) => Const<JsonSchema, A>
additionalProperties?: JsonSchema | false
) => any
```

Added in v1.2.0
Expand All @@ -277,9 +219,7 @@ Added in v1.2.0
**Signature**

```ts
export declare const tuple: <A extends readonly unknown[]>(
...items: { [K in keyof A]: Const<JsonSchema, A[K]> }
) => Const<JsonSchema, A>
export declare const tuple: <A extends readonly unknown[]>(...items: { [K in keyof A]: any }) => any
```

Added in v1.2.0
Expand All @@ -289,9 +229,7 @@ Added in v1.2.0
**Signature**

```ts
export declare const union: <U extends readonly Const<JsonSchema, unknown>[]>(
...members: U
) => Const<JsonSchema, U[number] extends Const<JsonSchema, infer A> ? A : never>
export declare const union: <U extends readonly any[]>(...members: U) => any
```

Added in v1.2.0
Expand Down Expand Up @@ -320,7 +258,7 @@ Interprets a schema as a JsonSchema projecting into either Draft-07 or 2020-12

```ts
export declare const deriveJsonSchema: <I, O>(
schema: Schema<I, O>,
schema: any,
version?: 'Draft-07' | '2019-09' | '2020-12',
maintainIdentity?: boolean
) => JsonSchema
Expand Down
2 changes: 1 addition & 1 deletion docs/MergeSemigroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Interprets a schema as a MergeSemigroup
**Signature**

```ts
export declare const deriveMergeSemigroup: Interpreter<SchemableLambda>
export declare const deriveMergeSemigroup: any
```

Added in v2.0.0
Expand Down
2 changes: 1 addition & 1 deletion docs/TranscodeError.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TranscodeError.ts
nav_order: 85
nav_order: 86
permalink: /transcode-error/
---

Expand Down
33 changes: 12 additions & 21 deletions docs/Transcoder.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Transcoder.ts
nav_order: 86
nav_order: 87
permalink: /transcoder/
---

Expand Down Expand Up @@ -54,10 +54,7 @@ A failure case at a specific index
**Signature**

```ts
export declare const errorAtIndex: (
index: number,
...errors: RNEA.ReadonlyNonEmptyArray<TE.TranscodeError>
) => TE.TranscodeError
export declare const errorAtIndex: (index: number, ...errors: RNEA.ReadonlyNonEmptyArray<TE.TranscodeError>) => any
```

Added in v2.0.0
Expand All @@ -69,10 +66,7 @@ A failure case at a specific key
**Signature**

```ts
export declare const errorAtKey: (
key: string,
...errors: RNEA.ReadonlyNonEmptyArray<TE.TranscodeError>
) => TE.TranscodeError
export declare const errorAtKey: (key: string, ...errors: RNEA.ReadonlyNonEmptyArray<TE.TranscodeError>) => any
```

Added in v2.0.0
Expand All @@ -87,7 +81,7 @@ A failure case for a union member
export declare const errorAtUnionMember: (
member: string | number,
...errors: RNEA.ReadonlyNonEmptyArray<TE.TranscodeError>
) => TE.TranscodeError
) => any
```

Added in v2.0.0
Expand All @@ -97,7 +91,7 @@ Added in v2.0.0
**Signature**

```ts
export declare const failure: <A>(e: TE.TranscodeErrors) => Either<TE.TranscodeErrors, A>
export declare const failure: <A>(e: any) => any
```

Added in v2.0.0
Expand All @@ -109,7 +103,7 @@ A failure case for a serialization or deserialization error
**Signature**

```ts
export declare const serializationError: (expected: string, error: unknown, actual: unknown) => TE.TranscodeError
export declare const serializationError: (...args: ConstructorParameters<typeof TE.SerializationError>) => any
```

Added in v2.0.0
Expand All @@ -119,7 +113,7 @@ Added in v2.0.0
**Signature**

```ts
export declare const success: <A>(a: A) => Either<TE.TranscodeErrors, A>
export declare const success: <A>(a: A) => any
```

Added in v2.0.0
Expand All @@ -131,7 +125,7 @@ A collection of failure cases
**Signature**

```ts
export declare const transcodeErrors: (...errors: RNEA.ReadonlyNonEmptyArray<TE.TranscodeError>) => TE.TranscodeErrors
export declare const transcodeErrors: (...errors: RNEA.ReadonlyNonEmptyArray<TE.TranscodeError>) => any
```

Added in v2.0.0
Expand All @@ -143,7 +137,7 @@ A failure case for a value that does not match the expected type
**Signature**

```ts
export declare const typeMismatch: (expected: string, actual: unknown) => TE.TranscodeError
export declare const typeMismatch: (...args: ConstructorParameters<typeof TE.TypeMismatch>) => any
```

Added in v2.0.0
Expand All @@ -155,7 +149,7 @@ A failure case for an unexpected value
**Signature**

```ts
export declare const unexpectedValue: (actual: unknown) => TE.TranscodeError
export declare const unexpectedValue: (...errors: ConstructorParameters<typeof TE.UnexpectedValue>) => any
```

Added in v2.0.0
Expand All @@ -167,10 +161,7 @@ Added in v2.0.0
**Signature**

```ts
export declare const drawErrorTree: (
errors: TE.TranscodeErrors,
configuration?: { readonly showHeading?: boolean | undefined } | undefined
) => string
export declare const drawErrorTree: (...params: Parameters<typeof TE.drawTree>) => string
```

Added in v2.0.0
Expand Down Expand Up @@ -208,7 +199,7 @@ Interprets a schema as a decoder
**Signature**

```ts
export declare const deriveTranscoder: <I, O>(schema: Schema<I, O>) => Transcoder<I, O>
export declare const deriveTranscoder: <I, O>(schema: any) => Transcoder<I, O>
```

Added in v2.0.0
Expand Down
8 changes: 4 additions & 4 deletions docs/TranscoderPar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TranscoderPar.ts
nav_order: 87
nav_order: 88
permalink: /transcoder-par/
---

Expand Down Expand Up @@ -42,7 +42,7 @@ Added in v2.0.0
**Signature**

```ts
export declare const failure: <A>(e: TCE.TranscodeErrors) => TaskEither<TCE.TranscodeErrors, A>
export declare const failure: <A>(e: any) => any
```

Added in v2.0.0
Expand All @@ -52,7 +52,7 @@ Added in v2.0.0
**Signature**

```ts
export declare const success: <A>(a: A) => TaskEither<TCE.TranscodeErrors, A>
export declare const success: <A>(a: A) => any
```

Added in v2.0.0
Expand Down Expand Up @@ -90,7 +90,7 @@ Interprets a schema as a decoder
**Signature**

```ts
export declare const deriveTranscoderPar: <I, O>(schema: Schema<I, O>) => TranscoderPar<I, O>
export declare const deriveTranscoderPar: <I, O>(schema: any) => TranscoderPar<I, O>
```

Added in v2.0.0
Expand Down

0 comments on commit f28cbe7

Please sign in to comment.