Skip to content

Commit

Permalink
refactor: change arg type from any to unknown. Fixes #7 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
lean-dev authored Jan 4, 2024
1 parent ea4e3c1 commit b804147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class InvariantError extends Error {
* @throws {InvariantError} if condition is falsey
*/
export function invariant(
condition: any,
condition: unknown,
message: string | (() => string),
): asserts condition {
if (!condition) {
Expand All @@ -47,7 +47,7 @@ export function invariant(
* @throws {Response} if condition is falsey
*/
export function invariantResponse(
condition: any,
condition: unknown,
message: string | (() => string),
responseInit?: ResponseInit,
): asserts condition {
Expand Down

0 comments on commit b804147

Please sign in to comment.