MCPcopy Index your code
hub / github.com/nukeop/nuclear / #withHost

Method #withHost

packages/plugin-sdk/src/api/queue.ts:12–18  ·  view source on GitHub ↗
(fn: (host: QueueHost) => T)

Source from the content-addressed store, hash-verified

10 }
11
12 #withHost<T>(fn: (host: QueueHost) => T): T {
13 const host = this.#host;
14 if (!host) {
15 throw new Error('Queue host not available');
16 }
17 return fn(host);
18 }
19
20 getQueue() {
21 return this.#withHost((h) => h.getQueue());

Callers 15

getQueueMethod · 0.95
getCurrentItemMethod · 0.95
addToQueueMethod · 0.95
addNextMethod · 0.95
addAtMethod · 0.95
removeByIdsMethod · 0.95
removeByIndicesMethod · 0.95
clearQueueMethod · 0.95
reorderMethod · 0.95
updateItemStateMethod · 0.95
goToNextMethod · 0.95
goToPreviousMethod · 0.95

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected