10.0.0 • Published 1 year ago

@mikelgo/ng-types v10.0.0

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

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