~Abhinav
TTCTheo's Typesafe Cult
•Created by ~Abhinav on 5/18/2023 in #questions
Typescript error for "property does not exist', when it clearly does.
4 replies
TTCTheo's Typesafe Cult
•Created by ~Abhinav on 2/6/2023 in #questions
Static typing key: value of an object while defining
Ideally, want to statically type the keys and values in THEMES object in compile time. Currently, keys are of type "string", which I don't want.
export type THEMES_CLASSES =
| "light-yellow"
| "dark"
| "light-green"
| "light-blue";
export const THEMES: { any: THEMES_CLASSES } = {
LIGHT_YELLOW: "light-yellow",
LIGHT_GREEN: "light-green",
LIGHT_BLUE: "light-blue",
DARK: "dark",
};
Any help is much appreciated 6 replies
TTCTheo's Typesafe Cult
•Created by ~Abhinav on 11/9/2022 in #questions
window is not defined inside Suspense boundary.
12 replies