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

Function getInstanceFrom

src/core/scope/utils.ts:74–78  ·  view source on GitHub ↗
(constructor: ConstructorOf<T>, scope: Scope)

Source from the content-addressed store, hash-verified

72}
73
74function getInstanceFrom<T>(constructor: ConstructorOf<T>, scope: Scope): T | undefined {
75 const scopeMap = map.get(constructor)
76
77 return scopeMap && scopeMap.get(scope)
78}
79
80// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
81export function createScopeWithRequest(req: Request, scope: any | undefined) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected