Port next.js to TypeScript (#51438)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { Request } from 'express'
|
||||
import type { Failbot } from '@github/failbot'
|
||||
|
||||
import type enterpriseServerReleases from '@/versions/lib/enterprise-server-releases.d.ts'
|
||||
|
||||
@@ -11,7 +12,7 @@ export type ExtendedRequest = Request & {
|
||||
context?: Context
|
||||
language?: string
|
||||
userLanguage?: string
|
||||
// Add more properties here as needed
|
||||
FailBot?: Failbot
|
||||
}
|
||||
|
||||
// TODO: Make this type from inference using AJV based on the schema.
|
||||
@@ -164,6 +165,8 @@ export type Context = Features & {
|
||||
productGroups?: ProductGroup[]
|
||||
featuredLinks?: FeaturedLinksExpanded
|
||||
currentLearningTrack?: LearningTrack | null
|
||||
renderedPage?: string
|
||||
miniTocItems?: string | undefined
|
||||
}
|
||||
export type LearningTracks = {
|
||||
[group: string]: {
|
||||
@@ -349,6 +352,10 @@ export type Page = {
|
||||
autogenerated?: string
|
||||
featuredLinks?: FeaturedLinksExpanded
|
||||
redirect_from?: string[]
|
||||
showMiniToc?: boolean
|
||||
effectiveDate?: string
|
||||
fullTitle?: string
|
||||
render: (context: Context) => Promise<string>
|
||||
}
|
||||
|
||||
type ChangeLog = {
|
||||
|
||||
Reference in New Issue
Block a user