MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / handleOrNull

Function handleOrNull

apps/local/src/executor.ts:147–157  ·  view source on GitHub ↗
(promise: ReturnType<typeof createExecutorHandle>)

Source from the content-addressed store, hash-verified

145 );
146
147const handleOrNull = (promise: ReturnType<typeof createExecutorHandle>) =>
148 Effect.runPromise(
149 Effect.tryPromise({
150 try: () => promise,
151 catch: (cause) => new LocalExecutorDisposeError({ operation: "createHandle", cause }),
152 }).pipe(
153 Effect.catch(() =>
154 Effect.succeed<Awaited<ReturnType<typeof createExecutorHandle>> | null>(null),
155 ),
156 ),
157 );
158
159const createLocalExecutorLayer = (options: LocalExecutorOptions = {}) => {
160 const storage = resolveStorage();

Callers 1

disposeCurrentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected