mobx 6.3.5 → 6.3.6
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/CHANGELOG.md +8 -0
- package/dist/mobx.cjs.development.js +6 -2
- package/dist/mobx.cjs.development.js.map +1 -1
- package/dist/mobx.cjs.production.min.js +1 -1
- package/dist/mobx.cjs.production.min.js.map +1 -1
- package/dist/mobx.esm.development.js +6 -2
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js +6 -2
- package/dist/mobx.esm.js.map +1 -1
- package/dist/mobx.esm.production.min.js +1 -1
- package/dist/mobx.esm.production.min.js.map +1 -1
- package/dist/mobx.umd.development.js +6 -2
- package/dist/mobx.umd.development.js.map +1 -1
- package/dist/mobx.umd.production.min.js +1 -1
- package/dist/mobx.umd.production.min.js.map +1 -1
- package/package.json +1 -1
- package/src/api/makeObservable.ts +7 -1
- package/src/api/when.ts +1 -1
package/package.json
CHANGED
|
@@ -12,7 +12,8 @@ import {
|
|
|
12
12
|
die,
|
|
13
13
|
ownKeys,
|
|
14
14
|
extendObservable,
|
|
15
|
-
addHiddenProp
|
|
15
|
+
addHiddenProp,
|
|
16
|
+
storedAnnotationsSymbol
|
|
16
17
|
} from "../internal"
|
|
17
18
|
|
|
18
19
|
// Hack based on https://github.com/Microsoft/TypeScript/issues/14829#issuecomment-322267089
|
|
@@ -30,6 +31,11 @@ export function makeObservable<T extends object, AdditionalKeys extends Property
|
|
|
30
31
|
const adm: ObservableObjectAdministration = asObservableObject(target, options)[$mobx]
|
|
31
32
|
startBatch()
|
|
32
33
|
try {
|
|
34
|
+
if (__DEV__ && annotations && target[storedAnnotationsSymbol]) {
|
|
35
|
+
die(
|
|
36
|
+
`makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported.`
|
|
37
|
+
)
|
|
38
|
+
}
|
|
33
39
|
// Default to decorators
|
|
34
40
|
annotations ??= collectStoredAnnotations(target)
|
|
35
41
|
|
package/src/api/when.ts
CHANGED