Skip to content

Commit 56d1bdf

Browse files
ReturnType
1 parent a0bdc30 commit 56d1bdf

File tree

1 file changed

+5
-6
lines changed
  • packages/sources/node/src/types

1 file changed

+5
-6
lines changed

packages/sources/node/src/types/elb.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
import type { Elb, WalkerOS } from '@elbwalker/types';
22
import { DestinationNode, SourceNode } from '.';
33

4-
export interface Fn<R = Promise<PushResult>>
5-
extends Elb.Fn<R>,
6-
Parameters<R>,
7-
Event<R> {}
4+
export interface Fn<R = Return> extends Elb.Fn<R>, Parameters<R>, Event<R> {}
85

9-
export type Parameters<R = Promise<PushResult>> = (
6+
export type Parameters<R = Return> = (
107
name: string,
118
data?: PushData,
129
options?: PushOptions,
1310
) => R;
1411

15-
export type Event<R = Promise<PushResult>> = (
12+
export type Event<R = Return> = (
1613
event: WalkerOS.DeepPartialEvent,
1714
data?: PushData,
1815
options?: PushOptions,
@@ -29,3 +26,5 @@ export interface PushResult extends DestinationNode.PushResult {
2926
event?: WalkerOS.Event;
3027
status: SourceNode.Status;
3128
}
29+
30+
export type Return<R = Promise<PushResult>> = R;

0 commit comments

Comments
 (0)