MCPcopy Create free account
hub / github.com/LeetCode-OpenSource/ayanami / constructor

Function constructor

src/core/ayanami.ts:26–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 scopeName!: string
25
26 constructor() {
27 if (!isSSREnabled()) {
28 const name = Object.getPrototypeOf(this)[moduleNameKey]
29 if (!name) {
30 return
31 }
32 // @ts-ignore
33 const globalCache = globalScope[globalKey]
34
35 if (globalCache) {
36 const moduleCache = globalCache[name]
37 if (moduleCache) {
38 Reflect.defineMetadata(this.ssrLoadKey, true, this)
39 Object.defineProperty(this, 'defaultState', {
40 get: () => moduleCache[this.scopeName],
41 set: noop,
42 })
43 }
44 }
45 }
46 }
47
48 destroy(): void {
49 destroyIkariFrom(this)

Callers

nothing calls this directly

Calls 1

isSSREnabledFunction · 0.90

Tested by

no test coverage detected