( id: string, )
| 9 | } |
| 10 | |
| 11 | export 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 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…