ts-toolbelt
Advanced tools
Comparing version 9.5.7 to 9.5.8-test.1614976760638
@@ -5,2 +5,26 @@ # Changelog | ||
### [9.5.8](https://github.com/millsp/ts-toolbelt/compare/v9.5.1...v9.5.8) (2021-03-05) | ||
### Bug Fixes | ||
* **f.narrow:** fix variance and array inference ([4c7618d](https://github.com/millsp/ts-toolbelt/commit/4c7618d77b07d6b8c6dfd5087aa85a073bf57db3)) | ||
* **f.narrow:** higher order function support ([dad05ee](https://github.com/millsp/ts-toolbelt/commit/dad05eec6e6710ea4f63063658a3dee4d9c0ca28)) | ||
* **f.narrow:** preserve fns and better display ([a0d62d8](https://github.com/millsp/ts-toolbelt/commit/a0d62d8cfcd28eab7132c225ba187556ca749b4d)) | ||
* **f.narrow:** preserve functions ([c34f1b9](https://github.com/millsp/ts-toolbelt/commit/c34f1b95d0e0855203104eb696cfcb8221a65374)) | ||
* **f.narrow:** revert variance fixes ([12e014a](https://github.com/millsp/ts-toolbelt/commit/12e014a3f3d34047a3722486a73493f857a3697a)) | ||
* **f.narrow:** variance ([866ecd7](https://github.com/millsp/ts-toolbelt/commit/866ecd76744fc38244d85e7ef7b4bb90105cf7eb)) | ||
* **fn:** allow for curried in compose ([2bc5604](https://github.com/millsp/ts-toolbelt/commit/2bc560446916b423977c25e396b4f1f310b6c03f)) | ||
### Others | ||
* **release:** 9.5.2 ([ec4a953](https://github.com/millsp/ts-toolbelt/commit/ec4a953cabe6c4d704c0dca5f37d1dc630de047b)) | ||
* **release:** 9.5.3 ([0836f6e](https://github.com/millsp/ts-toolbelt/commit/0836f6e8187287a0c86f249e4e552d68a44e4f60)) | ||
* **release:** 9.5.4 ([855855e](https://github.com/millsp/ts-toolbelt/commit/855855e520ed4a04059f9d61884d2045dd0d751b)) | ||
* **release:** 9.5.5 ([e28bddf](https://github.com/millsp/ts-toolbelt/commit/e28bddf33066850a764e2ba344883ff84da561b9)) | ||
* **release:** 9.5.6 ([b8e0d0a](https://github.com/millsp/ts-toolbelt/commit/b8e0d0a83228baf666e00f4fdb0d99ca936c133f)) | ||
* **release:** 9.5.7 ([5646455](https://github.com/millsp/ts-toolbelt/commit/564645547862c7d698f4a03b15ccb7a5ffb5fc29)) | ||
* cleanup ([6f23f2e](https://github.com/millsp/ts-toolbelt/commit/6f23f2ec79145a0545eb45d15d50d0363a119b12)) | ||
### [9.5.7](https://github.com/millsp/ts-toolbelt/compare/v9.5.1...v9.5.7) (2021-03-05) | ||
@@ -7,0 +31,0 @@ |
@@ -16,2 +16,2 @@ /** | ||
*/ | ||
export declare type Narrowable = (() => any) | string | number | bigint | boolean | []; | ||
export declare type Narrowable = string | number | bigint | boolean; |
@@ -1,10 +0,9 @@ | ||
import { Cast } from '../Any/Cast'; | ||
import { Try } from '../Any/Try'; | ||
import { Narrowable } from './_Internal'; | ||
declare type EvalList<A> = A extends [] ? [] : never; | ||
/** | ||
* @hidden | ||
*/ | ||
declare type NarrowRaw<A> = EvalList<A> | (A extends Narrowable ? A : never) | { | ||
[K in keyof A]: NarrowRaw<A[K]>; | ||
}; | ||
declare type NarrowRaw<A> = (A extends [] ? [] : never) | (A extends Narrowable ? A : never) | ({ | ||
[K in keyof A]: A[K] extends Function ? A[K] : NarrowRaw<A[K]>; | ||
}); | ||
/** | ||
@@ -18,3 +17,3 @@ * Prevent type widening on generic function parameters | ||
* | ||
* declare function foo<A extends any[]>(x: F.Narrow<A | []>): A; | ||
* declare function foo<A extends any[]>(x: F.Narrow<A>): A; | ||
* declare function bar<A extends object>(x: F.Narrow<A>): A; | ||
@@ -29,3 +28,3 @@ * | ||
*/ | ||
declare type Narrow<A extends any> = Cast<A, NarrowRaw<A>>; | ||
declare type Narrow<A extends any> = Try<A, [], NarrowRaw<A>>; | ||
export { Narrow }; |
@@ -6,3 +6,3 @@ import { Modx } from './_Internal'; | ||
* @param K to choose fields | ||
* @param A to fill fields with | ||
* @param A (?=`unknown`) to fill fields with | ||
* @param modx (?=`['!', 'W']`) to set modifiers | ||
@@ -14,3 +14,3 @@ * @returns [[Object]] | ||
*/ | ||
export declare type Record<K extends Key, A extends any, modx extends Modx = ['!', 'W']> = { | ||
export declare type Record<K extends Key, A extends any = unknown, modx extends Modx = ['!', 'W']> = { | ||
'!': { | ||
@@ -17,0 +17,0 @@ 'R': { |
{ | ||
"name": "ts-toolbelt", | ||
"version": "9.5.7", | ||
"version": "9.5.8-test.1614976760638", | ||
"description": "TypeScript's largest utility library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
255548
6027
1