TypeScript Utility Functions for Runtime Type Checks
Core Type Matching Function const typeString = Object.prototype.toString; export function matchesType(input: unknown, expectedType: string): boolean { return typeString.call(input) === `[object ${expectedType}]`; } Check if Defined export function isDefined<T = unknown>(value?: T): value is T...