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

Function any

packages/agent-core/src/base/common/event.ts:129–143  ·  view source on GitHub ↗
(...events: Event<T>[])

Source from the content-addressed store, hash-verified

127 }
128
129 export function any<T>(...events: Event<T>[]): Event<T> {
130 return (listener, thisArg, disposables) => {
131 const combined = combinedDisposable(
132 ...events.map((e) => e((value) => listener.call(thisArg, value))),
133 );
134 if (disposables !== undefined) {
135 if (disposables instanceof DisposableStore) {
136 disposables.add(combined);
137 } else {
138 disposables.push(combined);
139 }
140 }
141 return combined;
142 };
143 }
144}

Callers

nothing calls this directly

Calls 4

combinedDisposableFunction · 0.90
eFunction · 0.85
addMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected