deno.land / x / xstate@xstate@4.33.6 / src / invoke.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
export interface InvokedPromiseOptions { id?: string;}
export interface PromiseMachineSchema { states: { pending: {}; resolved: {}; rejected: {}; };}
// export function fromPromise<T>(// promise: Promise<T>,// options?: InvokedPromiseOptions// ): any {// const optionsWithDefaults = {// id: 'promise',// ...options// };
// return Machine<T, PromiseMachineSchema>({// id: optionsWithDefaults.id,// initial: 'pending',// states: {// pending: {},// resolved: {},// rejected: {}// }// });// }
xstate

Version Info

Tagged at
2 years ago