MCPcopy
hub / github.com/mobxjs/mobx / createDecoratorAnnotation

Function createDecoratorAnnotation

packages/mobx/src/api/decorators.ts:12–23  ·  view source on GitHub ↗
(
    annotation: Annotation
)

Source from the content-addressed store, hash-verified

10 * - annotation object
11 */
12export function createDecoratorAnnotation<D extends Decorator = Decorator>(
13 annotation: Annotation
14): PropertyDecorator & Annotation & D {
15 function decorator(target, property) {
16 if (is20223Decorator(property)) {
17 return annotation.decorate_20223_(target, property)
18 } else {
19 storeAnnotation(target, property, annotation)
20 }
21 }
22 return Object.assign(decorator, annotation) as any
23}
24
25/**
26 * Stores annotation to prototype,

Callers 5

flow.tsFile · 0.85
computed.tsFile · 0.85
observable.tsFile · 0.85
action.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…