type-plus icon indicating copy to clipboard operation
type-plus copied to clipboard

Additional types and types adjusted utilities for TypeScript

Results 29 type-plus issues
Sort by recently updated
recently updated
newest added

The `filter` vs `validate` types are useful only if not modified. Also it promotes bad usage as the `If` enclosed type logic can lead to infinite result due to the...

```ts NumericStruct.Add // ^ fail as input not accepting `Fail` ``` Instead of: ```ts type NumericStruct.Add ... ``` Accept `Maybe` and propagate the error. This will simplify many implementation.

currently, `testType.*` can be used in test directly. e.g.: ```ts it('blah', () => { testType.equal(true) } ``` However, when the tests get complicates or when there are may duplication, you...

Forgive me if I have understood wrong (the functionality) but the following code shouldn't work without compiler problems? ```typescript assertType.isTrue(true as CanAssign); ``` If the order is inverted, it works...

bug
breaking change

I devised a fast logarithmic string length algorithm based on carefully building string type patterns which is surprisingly tedious due to `${string}${string}` simplifying to `${string}` so we need to add...

Added `StrictArrayType` for the current behavior. The `ArrayType` should accept both array and tuple like `StringType` accept string and string literals. Added `LooseArrayType` for the time being, before the breaking...

Update to support `Options: { caseNever, caseArray, caseEmptyTuple, caseUpperBound, caseLowerBound }`

breaking change

To remove: - `First` (`FindFirst`, `ArrayPlus.Find`) - `isType.t()` (`isType()`, `testType.true()`) - `isType.f()` (`isType()`, `testType.false()`) - `isType.never()` (`isType()`, `testType.never()`) - `isType.equal()` (`testType.equal()`) - `CommonKeys` (`CommonPropKeys`) - `PadLeft` (`PadStart`) Newly deprecated: -...

for testing: ```ts type R = number | undefined testType.hasUndefined(true) ```