Skip to content

Commit

Permalink
Update TypeGuards.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Feb 8, 2024
1 parent bc6de96 commit 7f20048
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/utils/TypeGuards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,4 @@ export function isPromiseRejected<T>(

export function isDefined<T>(input: T | null | undefined): input is T {
return input !== null && input !== undefined;
}

export function isValidType(input: object, expectedTypeProps: string[]): boolean {
for (const prop of expectedTypeProps) {
if (!(prop in input)) {
return false;
}
}
return true;
}

Check warning on line 15 in src/utils/TypeGuards.ts

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎`

0 comments on commit 7f20048

Please sign in to comment.