Framework
ScannedEntry
Represents a file discovered during directory scanning.
Passed to route processor functions.
| Property | Type | Description |
|---|
dynamicSegments? | { catchAll: { optional: boolean; param: string; }; params: string[]; } | Dynamic segment information extracted from the path. Only present if the path contains dynamic segments like [id], [...path], [[...slug]]. |
dynamicSegments.catchAll? | { optional: boolean; param: string; } | Catch-all segment info if present. Examples { param: "path", optional: false } for [...path].ts { param: "slug", optional: true } for [[...slug]].ts |
dynamicSegments.catchAll.optional | boolean | - |
dynamicSegments.catchAll.param | string | - |
dynamicSegments.params | string[] | List of dynamic parameter names from [param] segments. Example ["id", "slug"] for /users/[id]/posts/[slug].ts |
exports | Record<string, unknown> | All exports from the handler file. Includes default, config, and any named exports. |
filePath | string | File path relative to /src. Example "commands/admin/ban.ts" |
key | string | Generated key for this handler. Based on file path and route's KeyConfig. Example "ping", "admin ban", "users/[id]" |
relativePath | string | Relative path within the route directory. Example "admin/ban.ts" for /src/commands/admin/ban.ts |
type | string | Full type identifier combining namespace and route name. Example "discord:commands", "server:api" |