Switch URIPatterns to TypeValidators, Record, add typing to Object.entries with type-fest pkg

This commit is contained in:
2024-05-10 02:14:03 -05:00
parent f1fb5d422e
commit 16584baef4
4 changed files with 29 additions and 14 deletions

View File

@@ -1,4 +1,11 @@
import type { SyntheticEvent } from "react";
import type { Entries } from "type-fest";
declare global {
interface ObjectConstructor {
entries<T extends object>(o: T): Entries<T>
}
}
export function truthy(value: string | null | undefined) {
if (value == undefined) return false;