diff options
Diffstat (limited to 'src/state/lib/type-guards.ts')
-rw-r--r-- | src/state/lib/type-guards.ts | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/state/lib/type-guards.ts b/src/state/lib/type-guards.ts deleted file mode 100644 index 8fe651ffb..000000000 --- a/src/state/lib/type-guards.ts +++ /dev/null @@ -1,14 +0,0 @@ -export function isObj(v: unknown): v is Record<string, unknown> { - return !!v && typeof v === 'object' -} - -export function hasProp<K extends PropertyKey>( - data: object, - prop: K, -): data is Record<K, unknown> { - return prop in data -} - -export function isStrArray(v: unknown): v is string[] { - return Array.isArray(v) && v.every(item => typeof item === 'string') -} |