MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / toDisposable

Function toDisposable

packages/agent-core/src/di/lifecycle.ts:208–210  ·  view source on GitHub ↗
(fn: () => void)

Source from the content-addressed store, hash-verified

206}
207
208export function toDisposable(fn: () => void): IDisposable {
209 return new FunctionDisposable(fn);
210}
211
212export function combinedDisposable(...disposables: IDisposable[]): IDisposable {
213 const parent = toDisposable(() => dispose(disposables));

Callers 5

lifecycle.test.tsFile · 0.90
eventMethod · 0.90
createServicesFunction · 0.90
combinedDisposableFunction · 0.85
thenIfNotDisposedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected