Skip to content

Commit 734ab14

Browse files
committed
fix: invariant types
1 parent a2d78a8 commit 734ab14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/jsutils/invariant.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
export function invariant(condition: unknown, message?: string): void {
1+
export function invariant(
2+
condition: unknown,
3+
message?: string,
4+
): asserts condition {
25
const booleanCondition = Boolean(condition);
36
// istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
47
if (!booleanCondition) {

0 commit comments

Comments
 (0)