-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #299 from jacob-alford/integration-2.2
Integration 2.2
- Loading branch information
Showing
136 changed files
with
1,901 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
title: Assert.ts | ||
nav_order: 2 | ||
permalink: /assert/ | ||
--- | ||
|
||
## Assert overview | ||
|
||
Added in v2.2.0 | ||
|
||
--- | ||
|
||
<h2 class="text-delta">Table of contents</h2> | ||
|
||
- [Interpreters](#interpreters) | ||
- [deriveAssert](#deriveassert) | ||
- [deriveInputAssert](#deriveinputassert) | ||
- [deriveInputAssertTree](#deriveinputasserttree) | ||
- [Models](#models) | ||
- [Assert (interface)](#assert-interface) | ||
|
||
--- | ||
|
||
# Interpreters | ||
|
||
## deriveAssert | ||
|
||
A trait which will throw an error for when an expected "output" value does not match a | ||
schema's output type | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const deriveAssert: <I, O>(schema: Schema<I, O>) => Assert<O> | ||
``` | ||
Added in v2.2.0 | ||
## deriveInputAssert | ||
A trait which will throw an error for when an expected "input" value does not match a | ||
schema's input type | ||
**Signature** | ||
```ts | ||
export declare const deriveInputAssert: <I, O>(schema: Schema<I, O>) => Assert<I> | ||
``` | ||
Added in v2.2.0 | ||
## deriveInputAssertTree | ||
A trait which will throw an error for when an expected "input" value does not match a | ||
schema's input type | ||
Unlike `deriveInputAssert`, this will include the error tree in the error message | ||
**Signature** | ||
```ts | ||
export declare const deriveInputAssertTree: <I, O>(schema: Schema<I, O>) => Assert<I> | ||
``` | ||
Added in v2.2.0 | ||
# Models | ||
## Assert (interface) | ||
A trait which will throw an error for when a value does not match a schema | ||
**Signature** | ||
```ts | ||
export interface Assert<T> { | ||
readonly assert: (output: unknown) => asserts output is T | ||
} | ||
``` | ||
|
||
Added in v2.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: Eq.ts | ||
nav_order: 3 | ||
nav_order: 4 | ||
permalink: /eq/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: Guard.ts | ||
nav_order: 5 | ||
nav_order: 6 | ||
permalink: /guard/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: JsonSchema.ts | ||
nav_order: 7 | ||
nav_order: 8 | ||
permalink: /json-schema/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: MergeSemigroup.ts | ||
nav_order: 8 | ||
nav_order: 9 | ||
permalink: /merge-semigroup/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: Schema.ts | ||
nav_order: 10 | ||
nav_order: 11 | ||
permalink: /schema/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: Transcoder.ts | ||
nav_order: 88 | ||
nav_order: 92 | ||
permalink: /transcoder/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: TranscoderPar.ts | ||
nav_order: 89 | ||
nav_order: 93 | ||
permalink: /transcoder-par/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: TypeString.ts | ||
nav_order: 90 | ||
nav_order: 94 | ||
permalink: /type-string/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: brand.ts | ||
nav_order: 2 | ||
nav_order: 3 | ||
permalink: /brand/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: float.ts | ||
nav_order: 4 | ||
nav_order: 5 | ||
permalink: /float/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: integer.ts | ||
nav_order: 6 | ||
nav_order: 7 | ||
permalink: /integer/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: newtype.ts | ||
nav_order: 9 | ||
nav_order: 10 | ||
permalink: /newtype/ | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: Annotate | ||
nav_order: 11 | ||
nav_order: 12 | ||
parent: schemata | ||
--- | ||
|
||
|
Oops, something went wrong.