Skip to content

Releases: unional/type-plus

[email protected]

01 Jul 18:10
Compare
Choose a tag to compare

Patch Changes

  • 90eb2a4: Update package.json try fixing readme references

[email protected]

01 Jul 17:00
Compare
Choose a tag to compare

Minor Changes

  • e8547eb: Add IsOptionalKey<T, K>.
  • bd6c695: Add OptionalProps<T>.
    Improve OptionalKeys<T> and IsOptionalKey<T, K>
  • d3faa0b: Add OptionalKeys<T>

Patch Changes

  • d214ce6: Improve testType.inspect<T>(fn) to provide more information about T.

    Not consider as breaking change as the function is not expected to be use in any code.

[email protected]

26 Jun 04:35
Compare
Choose a tag to compare

Patch Changes

  • 6be5fa7: Improve IsLiteral type to support boolean, bigint, and symbol.
  • 0f0b9f8: Improve LeftJoin type behavior.

[email protected]

25 Jun 05:27
Compare
Choose a tag to compare

Minor Changes

  • a52cce0: Add testType.inspect<T>(fn) for easy type inspection.

[email protected]

25 Jun 05:03
Compare
Choose a tag to compare

Patch Changes

  • 26537d8: Improve RecursivePartial to work with function type.
    Also add | undefined to make it compliant with exactOptionalPropertyTypes.

[email protected]

25 Jun 01:36
Compare
Choose a tag to compare

Minor Changes

  • aacb1ff: Add AnyOrNeverType for parity.

    Update some code's JSDocs.

Patch Changes

  • ede34c2: Improve exports field
  • 74a71e3: remove extra empty {} for LeftJoin
  • 2d74ff0: Support verbatimModuleSyntax

v7.0.1

30 May 08:28
Compare
Choose a tag to compare

Patch Changes

  • 946c602: Remove @internal. It is causing those types to be skipped from output (cjs/esm/*.d.ts).

v7.0.0

30 May 08:08
Compare
Choose a tag to compare

Major Changes

  • 91c954f: Remove Digit and DigitArray.

    They are internal types to begin with.
    They were exported probably to fix the "type cannot be named" error.

  • 469c8bd: Fix array PadStart/PadLeft that triggers an infinite loop.

    Change default PadWith from any to unknown (breaking).

Minor Changes

  • Update Add, Subtract, and added Multiply which now works with number, bigint, positive, negative, and floating point.

  • e11d43c: Expose FindLast also as ArrayPlus.FindList.

    Improved its handling of array.

  • 25e5fcb: add NumericPlus

  • ee14247: Add ArrayPlus.SplitAt

  • a49abe2: Mark the following code as deprecated:

    • isType.t()
    • isType.f()
    • isType.never()
  • 4352d51: Add StringToNumber, StringToBigint, and StringToNumeric

  • e93e366: Add alternative Partial<T> type that works with exactOptionalPropertyTypes.

  • 10af363: Add ArrayPlus.Reverse<A>

  • 82ffd7d: Add NumericToString

  • 72aca9d: Add MathPlus.ToNegative

  • 09495be: Add ArrayPlus.Entries<A>.

  • 3e0e199: Add remaining types to testType.*.

    testType is changed to a proxy to simplify implementation.

  • 73bbcf0: Add PadStart, deprecase PadLeft

  • 65e84c4: Expose FindFirst also as ArrayPlus.Find.

    Improved its handling of array.

  • d2997de: Deprecate Equal and NotEqual. They are renamed to IsEqual and IsNotEqual.

    Equal and NotEqual will be changed to filter variant (a.k.a. parse variant) in the future.

  • 180a455: Add TuplePlus.PadStart.

  • 7bf5d39: Add StrictCanAssign<A,B> and testType.strictCanAssign()

  • 010a788: Deprecate assertType(subject constructor).
    Add T/F to Extendable and NotExtendable.

  • 74cc654: Alias Some under ArrayPlus.Some.

  • 4054c64: GreaterThan and Max now support floating point and negative numbers, and bigint

Patch Changes

  • 8461752: At should return V | undefined for tuple when N is number (or any which includes number).

  • aaffd23: fix Some<Array<number | string>, number> to return boolean.
    This is because besides Array<number | string> can be [1, 'a'],
    it can also be:

    const v: number | string = 123
    
    const a: Array<number | string> = [v]

    So Some<Array<number | string>, number> should distribute and return boolean.

  • 4878eb0: At should return V | undefined for array.

  • afc1840: Add Upper and Lower for IndexAt.

    This allow fine-grained control over the IndexAt behavior,
    when the value is out of bounds.

    This is used in cases where out-of-bounds values are coarsen to the upper and lower bound of the subject array.

  • d31ea31: Improve Abs to work with bigint

v6.8.1

11 May 02:49
Compare
Choose a tag to compare

Patch Changes

  • caa70e9: Support isolated stub.builder use case.

v6.8.0

10 May 06:38
Compare
Choose a tag to compare

Minor Changes

  • 38b59e9: Add stub.builder()

  • c2b6f37: Add more testType.*:

    testType.undefined()
    testType.null()
    testType.bigint()
    testType.strictBigint()
    testType.string()
    testType.strictString()

Patch Changes

  • 38b59e9: stub.build() should not accept no init value.