MCPcopy Create free account
hub / github.com/solidjs/solid-start / getServerFunction

Function getServerFunction

packages/start/src/fns/registration.ts:11–19  ·  view source on GitHub ↗
(
  id: string,
)

Source from the content-addressed store, hash-verified

9}
10
11export function getServerFunction<T extends any[], R>(
12 id: string,
13): ((...args: T) => Promise<R>) {
14 const fn = REGISTRATIONS.get(id) as ((...args: T) => Promise<R>) | undefined;
15 if (fn) {
16 return fn;
17 }
18 throw new Error('invalid server function: ' + id);
19}

Callers 1

handleServerFunctionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…