Skip to content

Commit

Permalink
docs: generate documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
andnp committed Mar 11, 2019
1 parent 65c067f commit ebe9c2e
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ npm install --save-dev simplytyped

**[Utils](#utils)**

[NoInfer](#noinfer) - [Nominal](#nominal) - [Nullable](#nullable) - [PromiseOr](#promiseor) - [Unknown](#unknown)
[NoInfer](#noinfer) - [Nominal](#nominal) - [Nullable](#nullable) - [PromiseOr](#promiseor)

**[Functions](#functions)**

[AnyFunc](#anyfunc) - [ArgsAsTuple](#argsastuple) - [ConstructorFunction](#constructorfunction) - [OverwriteReturn](#overwritereturn) - [Predicate](#predicate)

**[Strings](#strings)**

[Diff](#diff) - [DropString](#dropstring) - [StringEqual](#stringequal) - [UnionContains](#unioncontains)
[DropString](#dropstring) - [StringEqual](#stringequal) - [UnionContains](#unioncontains)

**[Tuples](#tuples)**

Expand Down Expand Up @@ -595,10 +595,6 @@ test('Will give back a promise containing given type union the type itself', t =

```

### Unknown
A constant type that mimics an unknowable type.


## Functions

### AnyFunc
Expand Down Expand Up @@ -627,7 +623,7 @@ test("Can get a tuple of function's argument types", t => {
type F2 = (x: number, y: string) => any;
type F3 = (x: number, y: string, z: boolean) => any;

type E0 = void[];
type E0 = [];
type E1 = [number];
type E2 = [number, string];
type E3 = [number, string, boolean];
Expand Down Expand Up @@ -691,22 +687,6 @@ test('Can build a predicate function with unknown argument types', t => {

## Strings

### Diff

```ts
test('Can get difference between unions of strings', t => {
type a = 'hi' | 'there';
type b = 'hi' | 'my' | 'friend';

type gotA = Diff<a, b>;
type gotB = Diff<b, a>;

assert<gotA, 'there'>(t);
assert<gotB, 'my' | 'friend'>(t);
});

```

### DropString

```ts
Expand Down

0 comments on commit ebe9c2e

Please sign in to comment.