1
0
mirror of synced 2026-01-24 15:01:44 -05:00
Files
docs/src/types.ts
2024-05-08 11:17:36 +00:00

14 lines
429 B
TypeScript

import type { Request } from 'express'
// Throughout our codebase we "extend" the Request object by attaching
// things to it. For example `req.context = { currentCategory: 'foo' }`.
// This type aims to match all the custom things we do to requests
// througout the codebase.
export type ExtendedRequest = Request & {
pagePath?: string
context?: {
currentCategory?: string
}
// Add more properties here as needed
}