MCPcopy Index your code
hub / github.com/codeaashu/claude-code / emit

Method emit

src/ink/events/emitter.ts:15–38  ·  view source on GitHub ↗
(type: string | symbol, ...args: unknown[])

Source from the content-addressed store, hash-verified

13 }
14
15 override emit(type: string | symbol, ...args: unknown[]): boolean {
16 // Delegate to node for `error`, since it's not treated like a normal event
17 if (type === 'error') {
18 return super.emit(type, ...args)
19 }
20
21 const listeners = this.rawListeners(type)
22
23 if (listeners.length === 0) {
24 return false
25 }
26
27 const ccEvent = args[0] instanceof Event ? args[0] : null
28
29 for (const listener of listeners) {
30 listener.apply(this, args)
31
32 if (ccEvent?.didStopImmediatePropagation()) {
33 break
34 }
35 }
36
37 return true
38 }
39}
40

Callers 15

handleChangeFunction · 0.80
handleDeleteFunction · 0.80
notifyMethod · 0.80
setClassifierCheckingFunction · 0.80
clearClassifierCheckingFunction · 0.80
clearClassifierApprovalsFunction · 0.80
notifySubscribersFunction · 0.80
notifyTasksUpdatedFunction · 0.80
startAuthenticationMethod · 0.80
addOutputMethod · 0.80
setErrorMethod · 0.80
endAuthenticationMethod · 0.80

Calls 1

Tested by

no test coverage detected