Skip to content

Commit eeca731

Browse files
authored
Updates assert() type to declare condition to be true (#383)
* Update index.d.ts * Update index.d.ts
1 parent 22978e2 commit eeca731

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ export function reachTemplate(obj: object | null, template: string, options?: re
326326
*
327327
* @return Does not return a value but throws if the `condition` is falsy.
328328
*/
329-
export function assert(condition: any, error: Error): void;
329+
export function assert(condition: any, error: Error): asserts condition;
330330

331331

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

342342

343343
/**

0 commit comments

Comments
 (0)