extra-utils 6.0.1 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/fp/pipe-async.d.ts +1 -1
- package/lib/fp/pipe-async.js.map +1 -1
- package/lib/fp/pipe.d.ts +1 -1
- package/lib/fp/pipe.js.map +1 -1
- package/package.json +1 -1
- package/src/fp/pipe-async.ts +3 -1
- package/src/fp/pipe.ts +3 -1
package/README.md
CHANGED
|
@@ -388,7 +388,7 @@ function pipe<A, B>(
|
|
|
388
388
|
): B
|
|
389
389
|
function pipe<T, U>(
|
|
390
390
|
value: T
|
|
391
|
-
, ...operators: Array<(value:
|
|
391
|
+
, ...operators: Array<(value: any) => unknown>
|
|
392
392
|
): U
|
|
393
393
|
```
|
|
394
394
|
|
|
@@ -459,7 +459,7 @@ function pipeAsync<A, B>(
|
|
|
459
459
|
): Promise<B>
|
|
460
460
|
function pipeAsync<T, U>(
|
|
461
461
|
value: Awaitable<T>
|
|
462
|
-
, ...operators: Array<(value:
|
|
462
|
+
, ...operators: Array<(value: any) => Awaitable<unknown>>
|
|
463
463
|
): Promise<U>
|
|
464
464
|
```
|
|
465
465
|
|
package/lib/fp/pipe-async.d.ts
CHANGED
|
@@ -41,4 +41,4 @@ export declare function pipeAsync<A, B, C>(value: Awaitable<A>, ...operators: [
|
|
|
41
41
|
export declare function pipeAsync<A, B>(value: Awaitable<A>, ...operators: [
|
|
42
42
|
(value: A) => Awaitable<B>
|
|
43
43
|
]): Promise<B>;
|
|
44
|
-
export declare function pipeAsync<T, U>(value: Awaitable<T>, ...operators: Array<(value:
|
|
44
|
+
export declare function pipeAsync<T, U>(value: Awaitable<T>, ...operators: Array<(value: any) => Awaitable<unknown>>): Promise<U>;
|
package/lib/fp/pipe-async.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipe-async.js","sourceRoot":"","sources":["../../src/fp/pipe-async.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pipe-async.js","sourceRoot":"","sources":["../../src/fp/pipe-async.ts"],"names":[],"mappings":"AAuEA,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,KAAmB,EACnB,GAAG,SAAyC;IAE5C,IAAI,MAAM,GAAU,MAAM,KAAK,CAAA;IAC/B,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAA;IACjC,CAAC;IACD,OAAO,MAAW,CAAA;AACpB,CAAC"}
|
package/lib/fp/pipe.d.ts
CHANGED
|
@@ -40,4 +40,4 @@ export declare function pipe<A, B, C>(value: A, ...operators: [
|
|
|
40
40
|
export declare function pipe<A, B>(value: A, ...operators: [
|
|
41
41
|
(value: A) => B
|
|
42
42
|
]): B;
|
|
43
|
-
export declare function pipe<T, U>(value: T, ...operators: Array<(value:
|
|
43
|
+
export declare function pipe<T, U>(value: T, ...operators: Array<(value: any) => unknown>): U;
|
package/lib/fp/pipe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../src/fp/pipe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../src/fp/pipe.ts"],"names":[],"mappings":"AAqEA,MAAM,UAAU,IAAI,CAClB,KAAQ,EACR,GAAG,SAAyC;IAE5C,IAAI,MAAM,GAAU,KAAK,CAAA;IACzB,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC3B,CAAC;IACD,OAAO,MAAW,CAAA;AACpB,CAAC"}
|
package/package.json
CHANGED
package/src/fp/pipe-async.ts
CHANGED
|
@@ -65,7 +65,9 @@ export function pipeAsync<A, B>(
|
|
|
65
65
|
): Promise<B>
|
|
66
66
|
export function pipeAsync<T, U>(
|
|
67
67
|
value: Awaitable<T>
|
|
68
|
-
|
|
68
|
+
// 此处any有意义, 不可替换为unknown.
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
|
+
, ...operators: Array<(value: any) => Awaitable<unknown>>
|
|
69
71
|
): Promise<U>
|
|
70
72
|
export async function pipeAsync<T, U>(
|
|
71
73
|
value: Awaitable<T>
|
package/src/fp/pipe.ts
CHANGED
|
@@ -63,7 +63,9 @@ export function pipe<A, B>(
|
|
|
63
63
|
): B
|
|
64
64
|
export function pipe<T, U>(
|
|
65
65
|
value: T
|
|
66
|
-
|
|
66
|
+
// 此处any有意义, 不可替换为unknown.
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
|
+
, ...operators: Array<(value: any) => unknown>
|
|
67
69
|
): U
|
|
68
70
|
export function pipe<T, U>(
|
|
69
71
|
value: T
|