Function prepareAsyncFlowTools
- prepareAsyncFlowTools(outerZone, outerOptions?): {
adminAsyncFlow: Guarded<{
getFailures(): CopyMap<any, Passable>;
getFlowForOutcomeVow(outcomeVow: any): any;
wakeAll(): void;
}>;
allWokenP: Promise<void>;
asyncFlow: (<F>(zone: Zone, tag: string, guestFunc: F, options??: {
startEager?: boolean;
}) => HostOf<F>);
prepareAsyncFlowKit: ((zone: Zone, tag: string, guestAsyncFunc: GuestAsyncFunc, options??: {
startEager?: boolean;
}) => ((activationArgs: any) => GuardedKit<{
admin: {
complete(): void;
panic(fatalProblem: any): never;
reset(): void;
};
flow: {
dump(): (
| [op: "doFulfill", vow: Vow<Passable>, fulfillment: Passable]
| [op: "doReject", vow: Vow<Passable>, reason: Passable]
| [op: "doReturn", callIndex: number, result: Passable]
| [op: "doThrow", callIndex: number, problem: Passable]
| [op: "checkCall", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSendOnly", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSend", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number])[];
getFlowState(): FlowState;
getOptFatalProblem(): any;
getOutcome(): Vow<any>;
restart(eager??: boolean): void;
wake(): void;
};
wakeWatcher: {
onFulfilled(_fulfillment: any): void;
onRejected(_fulfillment: any): void;
};
}>));
prepareEndowment: ((zone: Zone, tag: string, e: unknown) => any);
} Returns {
adminAsyncFlow: Guarded<{
getFailures(): CopyMap<any, Passable>;
getFlowForOutcomeVow(outcomeVow: any): any;
wakeAll(): void;
}>;
allWokenP: Promise<void>;
asyncFlow: (<F>(zone: Zone, tag: string, guestFunc: F, options??: {
startEager?: boolean;
}) => HostOf<F>);
prepareAsyncFlowKit: ((zone: Zone, tag: string, guestAsyncFunc: GuestAsyncFunc, options??: {
startEager?: boolean;
}) => ((activationArgs: any) => GuardedKit<{
admin: {
complete(): void;
panic(fatalProblem: any): never;
reset(): void;
};
flow: {
dump(): (
| [op: "doFulfill", vow: Vow<Passable>, fulfillment: Passable]
| [op: "doReject", vow: Vow<Passable>, reason: Passable]
| [op: "doReturn", callIndex: number, result: Passable]
| [op: "doThrow", callIndex: number, problem: Passable]
| [op: "checkCall", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSendOnly", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSend", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number])[];
getFlowState(): FlowState;
getOptFatalProblem(): any;
getOutcome(): Vow<any>;
restart(eager??: boolean): void;
wake(): void;
};
wakeWatcher: {
onFulfilled(_fulfillment: any): void;
onRejected(_fulfillment: any): void;
};
}>));
prepareEndowment: ((zone: Zone, tag: string, e: unknown) => any);
}
adminAsyncFlow: Guarded<{
getFailures(): CopyMap<any, Passable>;
getFlowForOutcomeVow(outcomeVow: any): any;
wakeAll(): void;
}>
allWokenP: Promise<void>
asyncFlow: (<F>(zone: Zone, tag: string, guestFunc: F, options??: {
startEager?: boolean;
}) => HostOf<F>)
- <F>(zone, tag, guestFunc, options?): HostOf<F>
Parameters
- zone: Zone
- tag: string
- guestFunc: F
Optional
options: {
startEager?: boolean;
} = undefinedOptional
startEager?: boolean
prepareAsyncFlowKit: ((zone: Zone, tag: string, guestAsyncFunc: GuestAsyncFunc, options??: {
startEager?: boolean;
}) => ((activationArgs: any) => GuardedKit<{
admin: {
complete(): void;
panic(fatalProblem: any): never;
reset(): void;
};
flow: {
dump(): (
| [op: "doFulfill", vow: Vow<Passable>, fulfillment: Passable]
| [op: "doReject", vow: Vow<Passable>, reason: Passable]
| [op: "doReturn", callIndex: number, result: Passable]
| [op: "doThrow", callIndex: number, problem: Passable]
| [op: "checkCall", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSendOnly", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSend", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number])[];
getFlowState(): FlowState;
getOptFatalProblem(): any;
getOutcome(): Vow<any>;
restart(eager??: boolean): void;
wake(): void;
};
wakeWatcher: {
onFulfilled(_fulfillment: any): void;
onRejected(_fulfillment: any): void;
};
}>))
- (zone, tag, guestAsyncFunc, options?): ((activationArgs: any) => GuardedKit<{
admin: {
complete(): void;
panic(fatalProblem: any): never;
reset(): void;
};
flow: {
dump(): (
| [op: "doFulfill", vow: Vow<Passable>, fulfillment: Passable]
| [op: "doReject", vow: Vow<Passable>, reason: Passable]
| [op: "doReturn", callIndex: number, result: Passable]
| [op: "doThrow", callIndex: number, problem: Passable]
| [op: "checkCall", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSendOnly", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSend", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number])[];
getFlowState(): FlowState;
getOptFatalProblem(): any;
getOutcome(): Vow<any>;
restart(eager??: boolean): void;
wake(): void;
};
wakeWatcher: {
onFulfilled(_fulfillment: any): void;
onRejected(_fulfillment: any): void;
};
}>) Parameters
- zone: Zone
- tag: string
- guestAsyncFunc: GuestAsyncFunc
Optional
options: {
startEager?: boolean;
} = {}Optional
startEager?: boolean
Returns ((activationArgs: any) => GuardedKit<{
admin: {
complete(): void;
panic(fatalProblem: any): never;
reset(): void;
};
flow: {
dump(): (
| [op: "doFulfill", vow: Vow<Passable>, fulfillment: Passable]
| [op: "doReject", vow: Vow<Passable>, reason: Passable]
| [op: "doReturn", callIndex: number, result: Passable]
| [op: "doThrow", callIndex: number, problem: Passable]
| [op: "checkCall", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSendOnly", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSend", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number])[];
getFlowState(): FlowState;
getOptFatalProblem(): any;
getOutcome(): Vow<any>;
restart(eager??: boolean): void;
wake(): void;
};
wakeWatcher: {
onFulfilled(_fulfillment: any): void;
onRejected(_fulfillment: any): void;
};
}>)
- (activationArgs): GuardedKit<{
admin: {
complete(): void;
panic(fatalProblem: any): never;
reset(): void;
};
flow: {
dump(): (
| [op: "doFulfill", vow: Vow<Passable>, fulfillment: Passable]
| [op: "doReject", vow: Vow<Passable>, reason: Passable]
| [op: "doReturn", callIndex: number, result: Passable]
| [op: "doThrow", callIndex: number, problem: Passable]
| [op: "checkCall", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSendOnly", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSend", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number])[];
getFlowState(): FlowState;
getOptFatalProblem(): any;
getOutcome(): Vow<any>;
restart(eager??: boolean): void;
wake(): void;
};
wakeWatcher: {
onFulfilled(_fulfillment: any): void;
onRejected(_fulfillment: any): void;
};
}> Returns GuardedKit<{
admin: {
complete(): void;
panic(fatalProblem: any): never;
reset(): void;
};
flow: {
dump(): (
| [op: "doFulfill", vow: Vow<Passable>, fulfillment: Passable]
| [op: "doReject", vow: Vow<Passable>, reason: Passable]
| [op: "doReturn", callIndex: number, result: Passable]
| [op: "doThrow", callIndex: number, problem: Passable]
| [op: "checkCall", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSendOnly", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number]
| [op: "checkSend", target: Passable, optVerb: PropertyKey, args: Passable[], callIndex: number])[];
getFlowState(): FlowState;
getOptFatalProblem(): any;
getOutcome(): Vow<any>;
restart(eager??: boolean): void;
wake(): void;
};
wakeWatcher: {
onFulfilled(_fulfillment: any): void;
onRejected(_fulfillment: any): void;
};
}>
prepareEndowment: ((zone: Zone, tag: string, e: unknown) => any)
- (zone, tag, e): any
Parameters
- zone: Zone
- tag: string
- e: unknown
Returns any