mobx-state-tree 5.1.0 → 5.1.1
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.
- package/LICENSE +21 -0
- package/dist/core/flow.d.ts +3 -3
- package/package.json +3 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 Michel Weststrate
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/core/flow.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @hidden
|
|
3
3
|
*/
|
|
4
|
-
export declare type FlowReturn<R> = R extends
|
|
4
|
+
export declare type FlowReturn<R> = R extends PromiseLike<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<
|
|
10
|
+
export declare function flow<R, Args extends any[]>(generator: (...args: Args) => Generator<PromiseLike<any>, R, any>): (...args: Args) => PromiseLike<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) =>
|
|
41
|
+
export declare function toGeneratorFunction<R, Args extends any[]>(p: (...args: Args) => PromiseLike<R>): (...args: Args) => Generator<PromiseLike<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.
|
|
3
|
+
"version": "5.1.1",
|
|
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",
|
|
@@ -85,5 +85,6 @@
|
|
|
85
85
|
"frp",
|
|
86
86
|
"functional-reactive-programming",
|
|
87
87
|
"state management"
|
|
88
|
-
]
|
|
88
|
+
],
|
|
89
|
+
"gitHead": "108537f10bb12d8800a92297121db386bb232ec9"
|
|
89
90
|
}
|