Skip to content

scope

scope<TBindings>(config): RouteConfig<TBindings>[]

Defined in: src/core/scope.ts:98

Group routes under a shared path prefix with shared policies and metadata.

Returns a flat array of transformed RouteConfig objects ready to be spread into GatewayConfig.routes.

TBindings = Record<string, unknown>

Worker bindings type, propagated to child routes.

ScopeConfig<TBindings>

Scope configuration.

RouteConfig<TBindings>[]

Array of route configs with prefix, policies, and metadata applied.