chore: Cleanup unused vars, exports, types * Cleanup some unused exports * Remove more * Readd CampaignPageIncludedHotelsRef * Add alias comment to procedure exports * Remove unused exports Approved-by: Linus Flood
22 lines
665 B
TypeScript
22 lines
665 B
TypeScript
import { Lang } from "@scandic-hotels/common/constants/language"
|
|
|
|
const langs = Object.keys(Lang) as Lang[]
|
|
|
|
/*
|
|
* Keys for warmup functions, the order of the keys is the order in which they will be executed
|
|
*/
|
|
const warmupKeys = [
|
|
...langs.map((lang) => `countries_${lang}` as const),
|
|
"hotelsByCountry",
|
|
...langs.map((lang) => `hotelData_${lang}` as const),
|
|
...langs.map((lang) => `autoComplete_${lang}` as const),
|
|
] as const
|
|
|
|
export type WarmupFunctionsKey = (typeof warmupKeys)[number]
|
|
|
|
export function isWarmupKey(key: unknown): key is WarmupFunctionsKey {
|
|
return (
|
|
typeof key === "string" && warmupKeys.includes(key as WarmupFunctionsKey)
|
|
)
|
|
}
|