@cascateer/lib 1.0.4 → 1.0.6
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/package.json +1 -1
- package/src/index.ts +4 -0
- package/src/promise.ts +1 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UnaryFunction } from "rxjs";
|
|
2
|
+
import { MaybePromise } from "./promise";
|
|
2
3
|
|
|
3
4
|
export { asArray, type MaybeArray } from "./array";
|
|
4
5
|
export { chunkWith } from "./chunkWith";
|
|
@@ -18,10 +19,13 @@ export {
|
|
|
18
19
|
type MaybeObservableInput,
|
|
19
20
|
type MaybeObservableInputTuple,
|
|
20
21
|
} from "./observable";
|
|
22
|
+
export { type MaybePromise } from "./promise";
|
|
21
23
|
export { property } from "./property";
|
|
22
24
|
|
|
23
25
|
export type EndoFunction<T> = UnaryFunction<T, T>;
|
|
24
26
|
|
|
27
|
+
export type AsyncEndoFunction<T> = UnaryFunction<T, MaybePromise<T>>;
|
|
28
|
+
|
|
25
29
|
export type EndoFunctionOperator<T, U> = UnaryFunction<
|
|
26
30
|
EndoFunction<T>,
|
|
27
31
|
EndoFunction<U>
|
package/src/promise.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type MaybePromise<T> = T | Promise<T>;
|