Skip to content

Commit

Permalink
chore: observable use internal constants (#2902)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerleung0411 committed Jun 21, 2021
1 parent 320544a commit d78a159
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/fluffy-pumas-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"mobx": patch
---

chore: observable use internal constants
8 changes: 4 additions & 4 deletions packages/mobx/src/api/observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ export function asCreateObservableOptions(thing: any): CreateObservableOptions {
return thing || defaultCreateObservableOptions
}

const observableAnnotation = createObservableAnnotation("observable")
const observableRefAnnotation = createObservableAnnotation("observable.ref", {
const observableAnnotation = createObservableAnnotation(OBSERVABLE)
const observableRefAnnotation = createObservableAnnotation(OBSERVABLE_REF, {
enhancer: referenceEnhancer
})
const observableShallowAnnotation = createObservableAnnotation("observable.shallow", {
const observableShallowAnnotation = createObservableAnnotation(OBSERVABLE_SHALLOW, {
enhancer: shallowEnhancer
})
const observableStructAnnotation = createObservableAnnotation("observable.struct", {
const observableStructAnnotation = createObservableAnnotation(OBSERVABLE_STRUCT, {
enhancer: refStructEnhancer
})
const observableDecoratorAnnotation = createDecoratorAnnotation(observableAnnotation)
Expand Down

0 comments on commit d78a159

Please sign in to comment.