@mikelgo/ng-types
v10.0.0
Published
A utility library for Angular to handle strict types and some coercion helper
Downloads
47
Maintainers
Readme
ng-types
Tired of writing e.g. @Input() arg: string | null | undefined
over and over again when using Angular's strict mode?
ng-types
to the rescue! This handy lib provides a collection of types which will reflect strict inputs.
Besides that it offers some coercion helpers to make your life easier.
Installation
npm i @mikelgo/ng-types
Supported types
StringInput
NumberInput
BooleanInput
DateInput
ArrayInput
ObjectInput
FunctionInput
Coercion helpers
coerceBoolean
coerceNumber
coerceObservable
Compatibility
- Version 10.x.x is compatible with Angular >= 10.0.8