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

Function handleOrNull

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

Source from the content-addressed store, hash-verified

126 );
127
128const handleOrNull = (promise: ReturnType<typeof createExecutorHandle>) =>
129 Effect.runPromise(
130 Effect.tryPromise({
131 try: () => promise,
132 catch: (cause) => new LocalExecutorDisposeError({ operation: "createHandle", cause }),
133 }).pipe(
134 Effect.catch(() =>
135 Effect.succeed<Awaited<ReturnType<typeof createExecutorHandle>> | null>(null),
136 ),
137 ),
138 );
139
140const createLocalExecutorLayer = (options: LocalExecutorOptions = {}) => {
141 const storage = resolveStorage();

Callers 1

disposeCurrentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected