mobx-keystone-asyncstore
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -168,2 +168,3 @@ import { AnyModel, ModelClass, ModelProps, _Model } from "mobx-keystone"; | ||
getAll(): T[]; | ||
createAsyncContainer(id: string, add?: boolean): T; | ||
} |
@@ -181,2 +181,9 @@ "use strict"; | ||
} | ||
createAsyncContainer(id, add = false) { | ||
const ct = new AsyncContainer({ id }); | ||
if (add) { | ||
this.containers.set(id, ct); | ||
} | ||
return ct; | ||
} | ||
}; | ||
@@ -228,2 +235,5 @@ __decorate([ | ||
], BaseAsyncStore.prototype, "getAll", null); | ||
__decorate([ | ||
mobx_keystone_1.modelAction | ||
], BaseAsyncStore.prototype, "createAsyncContainer", null); | ||
BaseAsyncStore = __decorate([ | ||
@@ -230,0 +240,0 @@ mobx_keystone_1.model(`stores/BaseAsyncStore(${id})`) |
{ | ||
"name": "mobx-keystone-asyncstore", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"author": "Marcus Ekwall <marcus.ekwall@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36202
560