@ganbarodigital/ts-lib-value-objects
Version:
Helps you create value objects and refined types for safer software
13 lines • 508 B
TypeScript
/**
* A TypeGuard inspects a piece of data to see if the data is the given
* type.
*
* If the given data is the given type, the function returns `true`.
* It returns `false` otherwise.
*
* TypeGuards are a form of runtime robustness check. They're used to
* make sure that the given input is the type you think it is, before you
* try and use that input. They help prevent runtime errors.
*/
export declare type TypeGuard<T> = (input: unknown) => input is T;
//# sourceMappingURL=TypeGuard.d.ts.map