Skip to main content
zerotal

Documentation


Documentation / @zerotal/core / index / FileRouteContext

Interface: FileRouteContext

Defined in: router/FileRouter.ts:79

Context handed to a file-route resolver for each scanned route file.

Properties

urlPath

urlPath: string

Defined in: router/FileRouter.ts:81

URL path derived from the file location (e.g. '/users/:id').


module

module: Record<string, unknown>

Defined in: router/FileRouter.ts:83

The imported module's exports.


middleware

middleware: MiddlewareClass[]

Defined in: router/FileRouter.ts:85

Middleware collected from _middleware.ts files (outermost first).


name

name: string

Defined in: router/FileRouter.ts:87

Auto-generated GET route name for this path.


isIndex

isIndex: boolean

Defined in: router/FileRouter.ts:89

True when the file is an index.ts/index.tsx.


filePath

filePath: string

Defined in: router/FileRouter.ts:91

Absolute path to the source file on disk (useful for build-time compilation).


layout?

optional layout?: ViewComponent

Defined in: router/FileRouter.ts:93

Nearest _layout component for this dir, when layouts are enabled.