Carbon
CoreFunctions

createHandle

createHandle<Env>(factory): Handle<Env>

Creates a handle function that can be used to handle requests

Type Parameters

Type ParameterDefault type
Env extends PartialEnvPartialEnv

Parameters

ParameterTypeDescription
factory(env) => [Client, ...Plugin[]]The factory function that creates the plugins

Returns

Handle<Env>

The handle function

Example

const handle = createHandle((env) => {
 const client = new Client({ ... }, [ ... ])
 const linkedRoles = new LinkedRoles(client, { ... })
 return [client, linkedRoles]
})

On this page

Edit on GitHub