type {}
type {}
type {}A frozen object that consists of is, are, and guard objects.
const type = Object.freeze({
are,
is,
guard
});Properties
are
areThe object consists of are functions.
guard
guardThe object consists of guard functions.
is
isThe object consists of is functions.
Example usage
// Example usage.
import { type } from '@angular-package/type';
// `is` functions
type.is.boolean(true); // true, value is boolean
type.is.array(true); // false, value is any[]
// `guard` functions
type.guard.number(3); // true, value is numberLast updated
Was this helpful?