Skip to content

Commit

Permalink
Updates assert() type to declare condition to be true (#383)
Browse files Browse the repository at this point in the history
* Update index.d.ts

* Update index.d.ts
  • Loading branch information
hueniverse authored Jul 23, 2022
1 parent 22978e2 commit eeca731
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ export function reachTemplate(obj: object | null, template: string, options?: re
*
* @return Does not return a value but throws if the `condition` is falsy.
*/
export function assert(condition: any, error: Error): void;
export function assert(condition: any, error: Error): asserts condition;


/**
Expand All @@ -337,7 +337,7 @@ export function assert(condition: any, error: Error): void;
*
* @return Does not return a value but throws if the `condition` is falsy.
*/
export function assert(condition: any, ...args: any): void;
export function assert(condition: any, ...args: any): asserts condition;


/**
Expand Down

0 comments on commit eeca731

Please sign in to comment.