Skip to content

Commit

Permalink
chore(assert): use asserts typehint for ok method (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanatkn authored Jun 4, 2021
1 parent ae7fd4e commit a1f9bfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/assert.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type Types = 'string' | 'number' | 'boolean' | 'object' | 'undefined' | 'function';

export type Message = string | Error;
export function ok(actual: any, msg?: Message): void;
export function ok(actual: any, msg?: Message): asserts actual;
export function is(actual: any, expects: any, msg?: Message): void;
export function equal(actual: any, expects: any, msg?: Message): void;
export function type(actual: any, expects: Types, msg?: Message): void;
Expand Down

0 comments on commit a1f9bfb

Please sign in to comment.