type {}
type {}
type {}
A frozen object
that consists of is
, are
, and guard
objects.
const type = Object.freeze({
are,
is,
guard
});
Properties
are
are
The object
consists of are functions.
guard
guard
The object
consists of guard functions.
is
is
The 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 number
Last updated
Was this helpful?