Skip to content

Commit 8a26058

Browse files
async mapping support
1 parent 536a3b9 commit 8a26058

File tree

4 files changed

+131
-103
lines changed

4 files changed

+131
-103
lines changed

packages/types/src/mapping.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ export type Condition = (
4747
value: WalkerOS.DeepPartialEvent | unknown,
4848
mapping?: Value,
4949
instance?: WalkerOS.Instance,
50-
) => boolean;
50+
) => WalkerOS.PromiseOrValue<boolean>;
5151

5252
export type Fn = (
5353
value: WalkerOS.DeepPartialEvent | unknown,
5454
mapping: Value,
5555
options: Options,
56-
) => WalkerOS.Property | unknown;
56+
) => WalkerOS.PromiseOrValue<WalkerOS.Property | unknown>;
5757

5858
export type Loop = [Value, Value];
5959

@@ -65,4 +65,4 @@ export interface Options {
6565
props?: unknown;
6666
}
6767

68-
export type Validate = (value?: unknown) => boolean;
68+
export type Validate = (value?: unknown) => WalkerOS.PromiseOrValue<boolean>;

0 commit comments

Comments
 (0)