~Abhinav
~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.
oh yes it worked, weird. Can you please help me understand why this solution works but program.programSecTitle && and program["programSecTitle] && did not?
4 replies
TTCTheo's Typesafe Cult
Created by ~Abhinav on 2/6/2023 in #questions
Static typing key: value of an object while defining
Got it, working now. Thanks alot for your help @JulieCezar @Brendonovich
6 replies
TTCTheo's Typesafe Cult
Created by ~Abhinav on 2/6/2023 in #questions
Static typing key: value of an object while defining
Got it, thanks. I want to do the same thing for mapping THEME_CLASSES to their respective string color values like this export const ThemeColors = { "light-yellow": "#fde68a", "light-green": "#bbf7d0", "light-blue": "#bae6fd", dark: "#44403c", } satisfies { [key: THEMES_CLASSES]: string }; but its giving this error for "key" - "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead." Any ideas?
6 replies
TTCTheo's Typesafe Cult
Created by ~Abhinav on 11/9/2022 in #questions
window is not defined inside Suspense boundary.
Yes got it, 👍
12 replies
TTCTheo's Typesafe Cult
Created by ~Abhinav on 11/9/2022 in #questions
window is not defined inside Suspense boundary.
Yeah that i understand window object is not available on server. So basically React.lazy() doesn't have explicit option for ssr like dynamic() has. Cool, thank you for your help buddy.
12 replies
TTCTheo's Typesafe Cult
Created by ~Abhinav on 11/9/2022 in #questions
window is not defined inside Suspense boundary.
oh okay, but isn't React.lazy() import component on the client side? I thought that was the case
12 replies