mobx-state-tree 5.1.2 → 5.1.3

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.
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @hidden
3
3
  */
4
- export declare type FlowReturn<R> = R extends PromiseLike<infer T> ? T : R;
4
+ export declare type FlowReturn<R> = R extends Promise<infer T> ? T : R;
5
5
  /**
6
6
  * See [asynchronous actions](concepts/async-actions.md).
7
7
  *
8
8
  * @returns The flow as a promise.
9
9
  */
10
- export declare function flow<R, Args extends any[]>(generator: (...args: Args) => Generator<PromiseLike<any>, R, any>): (...args: Args) => PromiseLike<FlowReturn<R>>;
10
+ export declare function flow<R, Args extends any[]>(generator: (...args: Args) => Generator<PromiseLike<any>, R, any>): (...args: Args) => Promise<FlowReturn<R>>;
11
11
  /**
12
12
  * @deprecated Not needed since TS3.6.
13
13
  * Used for TypeScript to make flows that return a promise return the actual promise result.
@@ -38,7 +38,7 @@ export declare function castFlowReturn<T>(val: T): T;
38
38
  * }))
39
39
  * ```
40
40
  */
41
- export declare function toGeneratorFunction<R, Args extends any[]>(p: (...args: Args) => PromiseLike<R>): (...args: Args) => Generator<PromiseLike<R>, R, R>;
41
+ export declare function toGeneratorFunction<R, Args extends any[]>(p: (...args: Args) => Promise<R>): (...args: Args) => Generator<Promise<R>, R, R>;
42
42
  /**
43
43
  * @experimental
44
44
  * experimental api - might change on minor/patch releases
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobx-state-tree",
3
- "version": "5.1.2",
3
+ "version": "5.1.3",
4
4
  "description": "Opinionated, transactional, MobX powered state container",
5
5
  "main": "dist/mobx-state-tree.js",
6
6
  "umd:main": "dist/mobx-state-tree.umd.js",
@@ -86,5 +86,5 @@
86
86
  "functional-reactive-programming",
87
87
  "state management"
88
88
  ],
89
- "gitHead": "73510b3d7cb5e5febaf4b2978843e13a4c022d5e"
89
+ "gitHead": "baeb950d329e72bccf32bd32c0786d363a8e3531"
90
90
  }