UNPKG

@toreda/strong-types

Version:

Better TypeScript code in fewer lines.

17 lines (16 loc) 462 B
import type { Guarded, PrimitiveOrConstructor } from '@toreda/types'; /** * Determine whether object is an instance of provided type or className. * @param o * @param className * @returns * * @category Validators */ export declare function typeMatch<T extends PrimitiveOrConstructor>(o: unknown, className: T): o is Guarded<T>; /** * Alias for typeMatch for backwards compat. * * @category Validators */ export declare const isType: typeof typeMatch;