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

Function handleOrNull

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

Source from the content-addressed store, hash-verified

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

Callers 1

disposeCurrentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected