type-plus

Additional types and types adjusted utilities for TypeScript

MIT License

Downloads
91.8K
Stars
378
Committers
9

Bot releases are hidden (Show)

type-plus - v3.1.0

Published by unional about 4 years ago

3.1.0 (2020-10-16)

Features

type-plus - v3.0.0

Published by unional about 4 years ago

3.0.0 (2020-10-13)

Bug Fixes

  • add generics to AnyFunction (4e9b8eb)
  • adjust list() type (279feca)
  • boolean negative check (a317c15)
  • build and add ts-ignore (702be31)
  • CanAssign for boolean type (ef31c2a)
  • CanAssign<boolean, boolean> (1585009)
  • change Brand generic type order (c785ef2)
  • change record to string based only (688c413)
  • clean up types (045469b)
  • clean up types v2 (af6d919)
  • clean up types v3 (cf0b08a)
  • const number negative tests (8cc8115)
  • const string negative tests (730d394)
  • fix IsDisjoint<> but there is a bug in TypeScript (dd0e148)
  • implement and simplify record() (c7496ac)
  • improve AllTypes (8f1659d)
  • logical types with boolean type (74cc46e)
  • make TupleDevice tail type degenerate (9047a5b)
  • move satisfy under types (6df34b9)
  • multi violations drilldown (7a962fe)
  • object report should have space between prop (1bb90c2)
  • passing ts on return type (4c62fe9)
  • remove Id type (e8bc64c)
  • rename val() to create() (6addb41)
  • restrict ExcludeProtType to record (3c135db)
  • simplify AllTypes (4c36631)
  • simplify Object type processing (cd425da)
  • type this arg for everyKey() (887d5cf)
  • TypeEquals against boolean (901f4ae)
  • Types.Number should be number and not 0 (d185d24)
  • update logica types to propagate boolean (be55b64)
  • use AndS and NotS for IsDisjoint for the time being (babf650)
  • use typeSym for Brand and Flavor (90e61ec)

Features

BREAKING CHANGES

  • remove IsSame<A, B>

use TypeEquals<A, B> instead.

  • remove Id<>

Brand and Flavor is sufficient and provide the needed functionality.

  • remove createBrandCreator()

use brand(type) instead

  • remove createIdCreator

Use createId(type) instead.

  • remove assignability()

Same as tryAssign(),
use assertType.isTrue/False() with TypeEquals instead.

  • remove tryAssign()

Can be replaced with:

assertType.isTrue(true as TypeEquals<typeof a, typeof b>)
assertType.isFalse(false as TypeEquals<typeof a, typeof b>)
  • remove checkUnknown
  • remove assertUnknown

assertType() provides the same functionality

  • remove assertType.isNever()

It is a type-only check.
Does not align with other tests.
Use assertType<never>() instead

  • Brand and Flavor type has changed

It actually should not be breaking so to speak,
but just in case if there are multiple libraries doing brand and somehow something is not correct.

feat: add optional export

  • api change
type-plus - v2.2.0

Published by unional about 4 years ago

2.2.0 (2020-09-08)

Bug Fixes

  • isConstructor against edge cases (ba881bd)

Features

  • add checkUnknown() and isConstructor() (b6dc059)
type-plus - v2.1.0

Published by unional about 4 years ago

2.1.0 (2020-09-08)

Features

type-plus - v2.0.0

Published by unional about 4 years ago

2.0.0 (2020-09-08)

Features

  • assertType as assert functions (5eba950)

BREAKING CHANGES

  • enforce TypeScript 3.7
  • assertType() behavior changed

Add handler to assignability()

type-plus - v1.35.1

Published by unional over 4 years ago

1.35.1 (2020-03-02)

Bug Fixes

  • baisc cases for LeftJoin (0264947)
type-plus - v1.35.0

Published by unional over 4 years ago

1.35.0 (2020-03-02)

Features

type-plus - v1.34.0

Published by unional over 4 years ago

1.34.0 (2020-02-17)

Features

type-plus - v1.33.0

Published by unional over 4 years ago

1.33.0 (2020-02-17)

Features

  • add PromiseValueMerge() (646f818)
type-plus - v1.32.0

Published by unional over 4 years ago

1.32.0 (2020-02-14)

Bug Fixes

  • primitive and empty object (d22abda)

Features

type-plus - v1.31.3

Published by unional almost 5 years ago

1.31.3 (2020-01-08)

Bug Fixes

type-plus - v1.31.2

Published by unional almost 5 years ago

1.31.2 (2020-01-05)

Bug Fixes

type-plus - v1.31.1

Published by unional almost 5 years ago

1.31.1 (2020-01-05)

Bug Fixes

  • convert hasProperty() to predicate (463dc7a)
  • move hasProperty to its own (d86e0b0)
type-plus - v1.31.0

Published by unional almost 5 years ago

1.31.0 (2020-01-05)

Features

type-plus - v1.30.1

Published by unional almost 5 years ago

1.30.1 (2020-01-04)

Bug Fixes

  • improve PartialPick and PartialOmit (#49) (e1afb93)
type-plus - v1.30.0

Published by unional almost 5 years ago

1.30.0 (2020-01-03)

Features

type-plus - v1.29.0

Published by unional about 5 years ago

1.29.0 (2019-08-19)

Features

type-plus - v1.28.0

Published by unional about 5 years ago

1.28.0 (2019-08-17)

Features

type-plus - v1.27.0

Published by unional about 5 years ago

1.27.0 (2019-08-11)

Features

type-plus - v1.26.2

Published by unional over 5 years ago

1.26.2 (2019-07-09)

Bug Fixes

  • upgrade typescript to 3.5.3 (f67927b)