Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/esengine/esengine
/ factory
Function
factory
packages/core/src/Core/DI/Decorators.ts:322–322 ·
view source on GitHub ↗
(c: ServiceContainer)
Source
from the content-addressed store, hash-verified
320
321
// 创建工厂函数,使用createInstance自动解析依赖
322
const
factory = (c: ServiceContainer) => createInstance(serviceType, c);
323
324
// 注册到容器
325
if
(singleton) {
Callers
5
_handleSpawn
Method · 0.85
getOrAddComponent
Function · 0.85
withFactory
Method · 0.85
createLoader
Method · 0.85
withFactory
Method · 0.85
Calls
1
createInstance
Function · 0.85
Tested by
no test coverage detected