0.4.1 • Published 7 months ago

@luolapeikko/ts-common v0.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

ts-common

Collection of common TS utility types, interfaces and utils.

TypeScript npm version github action

Install

npm install @luolapeikko/ts-common

Documentation

  • Loadable type to handle loadable value (e.g. value, value Promise, callback function returning value).
  • Array utility types like NonEmptyArray and NonEmptyReadonlyArray.
  • Object utility conditional types like RecordHaveReadonlyKeys and RecordHaveWritableKeys.
  • OneOf type to handle one of types (non-union way).
  • Object replacement functions like objectEntries, objectKeys, objectValues and objectMap to handle better return types.
  • Error utils like toError(value: unknown): Error | UnknownError, errorAs(err, TypeError): TypeError or errorWith(err, (msg) => new TypeError(msg)): TypeError
  • Helper interfaces like IToString, IToJSON.

See more features on Package documentation

0.3.9

7 months ago

0.3.0

10 months ago

0.3.6

9 months ago

0.2.7

12 months ago

0.3.5

9 months ago

0.2.6

12 months ago

0.3.8

7 months ago

0.3.7

8 months ago

0.2.8

11 months ago

0.4.1

7 months ago

0.3.2

10 months ago

0.4.0

7 months ago

0.3.1

10 months ago

0.3.4

9 months ago

0.2.5

1 year ago

0.3.3

10 months ago

0.2.2

1 year ago

0.2.4

1 year ago

0.2.1

1 year ago

0.1.0

1 year ago

0.1.2

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.3

1 year ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago