Skip to content

Commit

Permalink
chore: bump to 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nberlette committed Nov 27, 2022
1 parent 431be73 commit de688c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ported by [**Nicholas Berlette**](https://github.com/nberlette) for Deno.
## Usage

```ts
import * as is from "https://deno.land/x/dis@0.0.1/mod.ts";
import * as is from "https://deno.land/x/dis@0.2.0/mod.ts";
```

### Type Checking
Expand All @@ -32,7 +32,7 @@ is.number(6);
if the type does not match.

```ts
import { assert } from "https://deno.land/x/dis@0.0.1/mod.ts";
import { assert } from "https://deno.land/x/dis@0.2.0/mod.ts";

assert.string(2);
// => Error: Expected value which is `string`, received value of type `number`.
Expand All @@ -41,7 +41,7 @@ assert.string(2);
### Assertions with TypeScript

```ts
import { assert } from "https://deno.land/x/dis@0.0.1/mod.ts";
import { assert } from "https://deno.land/x/dis@0.2.0/mod.ts";

assert.string(foo);
// `foo` is now typed as a `string`.
Expand Down Expand Up @@ -1011,7 +1011,7 @@ are being used extensively to infer the correct type inside if-else statements.
---
```ts
import is from "https://deno.land/x/dis@0.0.1/mod.ts";
import is from "https://deno.land/x/dis@0.2.0/mod.ts";
const padLeft = (value: string, padding: string | number) => {
if (is.number(padding)) {
// `padding` is typed as `number`
Expand Down Expand Up @@ -1052,7 +1052,7 @@ of the often repetitive `"if-not-expected-type-throw"` pattern.
---
```ts
import { assert } from "https://deno.land/x/dis@0.0.1/mod.ts";
import { assert } from "https://deno.land/x/dis@0.2.0/mod.ts";

const handleMovieRatingApiResponse = (response: unknown) => {
assert.plainObject(response);
Expand Down Expand Up @@ -1105,7 +1105,7 @@ runtime with `is` or `assert`.
---
```ts
import { assert } from "https://deno.land/x/dis@0.0.1/mod.ts";
import { assert } from "https://deno.land/x/dis@0.2.0/mod.ts";
async function badNumberAssumption(input: unknown) {
// Bad assumption about the generic type parameter fools the compile-time type system.
assert.promise<number>(input);
Expand Down
2 changes: 1 addition & 1 deletion version.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { $, ansi } from "./deps.ts";

/** `VERSION` managed by https://deno.land/x/publish */
export const VERSION = "0.0.1";
export const VERSION = "0.2.0";
export const MODULE = "dis";

/** `prepublish` will be invoked before publish */
Expand Down

0 comments on commit de688c7

Please sign in to comment.