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

Function getMixins

packages/mobx-react/src/utils/utils.ts:89–95  ·  view source on GitHub ↗
(target: object, methodName: string)

Source from the content-addressed store, hash-verified

87}
88
89function getMixins(target: object, methodName: string): Mixins {
90 const mixins = (target[mobxMixins] = target[mobxMixins] || {})
91 const methodMixins = (mixins[methodName] = mixins[methodName] || {})
92 methodMixins.locks = methodMixins.locks || 0
93 methodMixins.methods = methodMixins.methods || []
94 return methodMixins
95}
96
97function wrapper(realMethod: Function, mixins: Mixins, ...args: Array<any>) {
98 // locks are used to ensure that mixins are invoked only once per invocation, even on recursive calls

Callers 1

patchFunction · 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…