MCPcopy Index your code
hub / github.com/mobxjs/mobx / assertObservableDescriptor

Function assertObservableDescriptor

packages/mobx/src/types/observableannotation.ts:114–126  ·  view source on GitHub ↗
(
    adm: ObservableObjectAdministration,
    { annotationType_ }: Annotation,
    key: PropertyKey,
    descriptor: PropertyDescriptor
)

Source from the content-addressed store, hash-verified

112}
113
114function assertObservableDescriptor(
115 adm: ObservableObjectAdministration,
116 { annotationType_ }: Annotation,
117 key: PropertyKey,
118 descriptor: PropertyDescriptor
119) {
120 if (__DEV__ && !("value" in descriptor)) {
121 die(
122 `Cannot apply '${annotationType_}' to '${adm.name_}.${key.toString()}':` +
123 `\n'${annotationType_}' cannot be used on getter/setter properties`
124 )
125 }
126}

Callers 1

extend_Function · 0.85

Calls 2

dieFunction · 0.85
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…