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 - v6.7.1

Published by unional over 1 year ago

Patch Changes

  • 963f8a4a: Pass stub value to init function for stub()
type-plus - v6.7.0

Published by unional over 1 year ago

Minor Changes

  • cf32375f: Add NoInfer<T> and improve stub()
type-plus - v6.6.0

Published by unional over 1 year ago

Minor Changes

  • e098b7c3: Add StringSplit
  • 6a4bfd71: Add StringIncludes type.

Patch Changes

  • a9825e69: Update JSDocs
  • 7496bbaf: Remove extra unique symbol.
  • f52c794b: Fix Equal<A, B> to handle optional param.
type-plus - v6.5.0

Published by unional over 1 year ago

Minor Changes

  • 99afa70a: Add Failed and FailedT error type.

Patch Changes

  • c741e86e: Improve Brand and Flavor to handle all types.
    Added Branded and Flavored interface to improve their rendering in IDE.
type-plus - v6.4.0

Published by unional over 1 year ago

Minor Changes

  • bcc4b094: Adding a new set of types for type-level programming.

    • IsAnyOrNever
    • AnyType, IsAny, NotAnyType, IsNotAny
    • NeverType, IsNever, NotNeverType, IsNotNever
    • StrictBooleanType, IsStrictBoolean, NotStrictBooleanType, IsNotStrictBoolean
    • BooleanType, NotBooleanType, IsNotBoolean
    • TrueType, IsTrue, NotTrueType, IsNotTrue
    • FalseType, IsFalse, NotFalseType, IsNotFalse
    • ObjectType, IsObject, NotObjectType, IsNotObject
    • StrictFunctionType, IsStrictFunction, NotStrictFunctionType, IsNotStrictFunction
    • FunctionType, IsFunction, NotFunctionType, IsNotFunction
    • UndefinedType, IsUndefined, NotUndefinedType, IsNotUndefined
    • NumberType, IsNumber, NotNumberType, IsNotNumber
    • StrictNumberType, IsStrictNumber, NotStrictNumberType, IsNotStrictNumber
    • StringType, IsString, NotStringType, IsNotString
    • StrictStringType, IsStrictString, NotStrictStringType, IsNotStrictString
    • SymbolType, IsSymbol, NotSymbolType, IsNotSymbol
    • BigIntType, IsBigInt, NotBigIntType, IsNotBigInt
    • StrictBigIntType, IsStrictBigInt, NotStrictBigIntType, IsNotStrictBigInt
    • VoidType, IsVoid, NotVoidType, IsNotVoid
    • UnknownType, IsUnknown, NotUnknownType, IsNotUnknown
    • Positive, IsPositive, NotPositive, IsNotPositive

    Adding a new testType for testing.
    It provides better testing support compares to isType and assertType.

    Improve:

    • Equal: to support all known scenarios.
type-plus - v6.3.0

Published by unional over 1 year ago

Minor Changes

  • 1168acaa: Add TupleType

Patch Changes

  • 97888e9e: Equal handles tuple
type-plus - v6.2.0

Published by unional over 1 year ago

Minor Changes

  • bc82e907: Fix number types to support never correctly.

    Add IsInteger, Positive.

Patch Changes

  • 23fd42a3: Fix NumberType to handle any and union.
type-plus - v6.1.0

Published by unional over 1 year ago

Minor Changes

  • b6403520: Add ArrayType<A>

  • 569ff770: Export Concat under ArrayPlus.

  • 15257ec3: Add ArrayPlus.IsIndexOutOfBound<A, N>

  • 82bed0e2: Add ArrayPlus.IndexAt.

    Update At to use IndexAt to get consistent results.

  • 015d046e: Fix IsAny and add to AnyType.
    Now using the same mechanism from ts-essentials.

  • 3ff303ce: Add NumberType<T>

Patch Changes

  • 812949be: Default CreateTuple<_, T> to unknown.

    With TypeScript 5.0, the tuple size limit is now 9999.

  • 52d62003: Clean up type imports.
    Use Awaited instead of PromiseValue.

type-plus - v6.0.0

Published by unional over 1 year ago

Major Changes

  • 3a01eb6a: CJS target upgraded to ES2020

Minor Changes

  • 35b489de: Add the following:

    • isType.never
    • Numeric
    • Zero
    • Integer
    • Negative
    • NonNegative
    • NumberPlus.Numeric
    • NumberPlus.Zero
    • NumberPlus.Integer
    • NumberPlus.Negative
    • NumberPlus.NonNegative
    • At
    • ArrayPlus.At
    • ArrayPlus.Concat

Patch Changes

  • 33b78a76: Add module field for webpack 4 compatibility.
type-plus - v5.6.0

Published by unional almost 2 years ago

Minor Changes

  • 15443f6d: stub.build() now supports an initializer function.
    This allows the init value to be randomized.
type-plus - v5.5.2

Published by unional almost 2 years ago

Patch Changes

  • ce86656f: defaults inspector of inspect() to console.dir()
type-plus - v5.5.1

Published by unional almost 2 years ago

Patch Changes

  • b02fbae2: Each extender will now only execute once,
    across the extend tree.
type-plus - v5.5.0

Published by unional almost 2 years ago

Minor Changes

  • 0247123b: Add AwaitedProps<T, P>

    This is useful when working with context() where the props are Promise

Patch Changes

  • 6b109359: Allow context().extend() to specify type
type-plus - v5.4.1

Published by unional almost 2 years ago

Patch Changes

  • 48520281: Fix context() to support extender which only needs a partial of the current context.
type-plus - v5.4.0

Published by unional almost 2 years ago

Minor Changes

  • 9add14dc: Add context() builder
type-plus - v5.3.0

Published by unional almost 2 years ago

Minor Changes

  • d7338cb2: Add Then, Else support to logical types

Patch Changes

  • 29cf3b12: Update JSDocs for ExtractFunction
  • 29cf3b12: Improve Equal<A,B>
  • 5e21ddfe: Update JSDoc for compose()
type-plus - v5.2.0

Published by unional almost 2 years ago

Minor Changes

  • 340d54e: Add subject passthrough to object key utilities

Patch Changes

  • f0761b0: Mark inspector param as Readonly<T>
type-plus - v5.1.0

Published by unional almost 2 years ago

Minor Changes

  • 1a51b1f: add inspect()
  • b203aab: deprecates PromiseValue. Use the built-in Awaited<T> instead.
type-plus - v5.0.0

Published by unional almost 2 years ago

Major Changes

  • d43213f: Deprecates isConstructor.
    It cannot reliably detect non-constructors as normal functions and transpiled arrow functions are both returned true.

    Add isInstanceof() to do instanceof check against unknown or union types of constructor and other types.

    isType() does not accept AnyConstructor anymore. Use isInstanceof() instead (breaking).

Bug Fixes

4.18.0 (2022-11-18)

Features

4.17.0 (2022-11-08)

Features

4.16.0 (2022-10-31)

Features

type-plus - v4.18.1

Published by unional almost 2 years ago

4.18.1 (2022-12-09)

Bug Fixes