MCPcopy
hub / github.com/bombshell-dev/clack / on

Method on

packages/core/src/prompts/prompt.ts:93–95  ·  view source on GitHub ↗

* Subscribe to an event * @param event - The event name * @param cb - The callback

(event: T, cb: ClackEvents<TValue>[T])

Source from the content-addressed store, hash-verified

91 * @param cb - The callback
92 */
93 public on<T extends keyof ClackEvents<TValue>>(event: T, cb: ClackEvents<TValue>[T]) {
94 this.setSubscriber(event, { cb });
95 }
96
97 /**
98 * Subscribe to an event once

Callers 15

prompt.test.tsFile · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
promptMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80

Calls 1

setSubscriberMethod · 0.95

Tested by

no test coverage detected