1
0
mirror of synced 2025-12-23 03:44:00 -05:00

Port detect-language.js to TypeScript (#50623)

This commit is contained in:
Peter Bengtsson
2024-05-15 11:31:04 -04:00
committed by GitHub
parent a4689920ac
commit 38ceff46f4
5 changed files with 45 additions and 16 deletions

View File

@@ -10,5 +10,19 @@ export type ExtendedRequest = Request & {
currentCategory?: string
error?: Error
}
language?: string
userLanguage?: string
// Add more properties here as needed
}
type Language = {
name: string
code: string
hreflang: string
dir: string
wip: boolean
}
export type Languages = {
[key: string]: Language
}