@rnw-community/shared
TypeScript icon, indicating that this package has built-in type declarations

0.80.0 • Public • Published

Shared

Generic types, type guards and utilities commonly used across packages.

npm version npm downloads

Type guards

Convenient typescript type guards for everyday usage.

This type guards makes your code more explicit, readable and type-safe, both in runtime and typescript.

This package provides a set of convenient type guards for everyday usage with the following types:

Utils

Utility functions that helps with everyday tasks:

  • getErrorMessage - Get typesafe Error object message.
  • emptyFn - Useful default react prop callback value.
  • cs - Conditional styling util.
  • getDefined - Get fallback value if passed variable is not defined.
  • getDefinedAsync - Get async fallback value if passed variable is not defined.

Types

Commonly used typescript types:

License

This library is licensed under The MIT License.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @rnw-community/shared

      Weekly Downloads

      4,521

      Version

      0.80.0

      License

      MIT

      Unpacked Size

      55.7 kB

      Total Files

      179

      Last publish

      Collaborators

      • vitalyiegorov