type-plus
Advanced tools
Comparing version 1.8.0 to 1.9.0
{ | ||
"name": "type-plus", | ||
"description": "Provides additional types for `typescript`.", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"homepage": "https://github.com/unional/type-plus", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -37,12 +37,17 @@ # type-plus | ||
### Array function | ||
- `literalArray(...entries)`: return an array those items are restricted to the provided literals. | ||
### Type manipulation | ||
- `ExcludePropType<T, U>`: excludes type `U` from properties in `T`. | ||
- `PartialPick<T, U>`: makes the properties specified in `U` becomes optional. | ||
- `PartialExcept<T, U>`: makes the properties not specified in `U` becomes optional. | ||
- `RecursivePartial<T>`: make type T optional recursively. | ||
- `RecursiveRequired<T>`: make type T required recursively. | ||
- `RecursivePartial<T>`: make type `T` optional recursively. | ||
- `RecursiveRequired<T>`: make type `T` required recursively. | ||
- `RequiredPick<T, U>`: makes the properties specified in `U` becomes required. | ||
- `RequiredExcept<T, U>`: makes the properties not specified in `U` becomes required. | ||
- `RecursiveIntersect<T, U>`: intersect type U onto T recursively. | ||
- `ValueOf<T>`: type of the value of the properties of T. | ||
- `RecursiveIntersect<T, U>`: intersect type `U` onto `T` recursively. | ||
- `ValueOf<T>`: type of the value of the properties of `T`. | ||
@@ -49,0 +54,0 @@ ## Contribute |
@@ -7,6 +7,6 @@ import { literalArray } from '.'; | ||
let y = actual[0] | ||
// the cast is just for assignment. Does not affect type. | ||
let x: (typeof y) & 'c' = 1 as never | ||
let x: (typeof actual[number]) & 'c' = 'c' as never | ||
isNever(x) | ||
}) |
@@ -8,1 +8,5 @@ export function excludeUndefined<T>(actual: T): Exclude<T, undefined> { return actual as any } | ||
} | ||
export function isNumber(_: number) { | ||
return true | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34451
90
669
91