@code-workers.io/ng-types
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@code-workers.io/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 @code-workers.io/ng-types

Supported types

  • StringInput
  • NumberInput
  • BooleanInput
  • DateInput
  • ArrayInput
  • ObjectInput
  • FunctionInput
  • Nullable<T>
  • Optional<T>

Coercion helpers

  • coerceBoolean
  • coerceNumber
  • coerceObservable

Compatibility

  • Version 1.x.x is compatible with Angular >= 10.0.0

Package Sidebar

Install

npm i @code-workers.io/ng-types

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

16.6 kB

Total Files

18

Last publish

Collaborators

  • mikelgo