14 lines
429 B
TypeScript
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
|
|
}
|