Урош
Урош
TTCTheo's Typesafe Cult
Created by Урош on 7/17/2024 in #questions
Losing typesafety after wrapping json import in a function
upon further reading it seems that having defined keys of languages provides stronger type checking compared to when it's just a string which doesn't really provide the tsc with any usefull info I would assume.
4 replies
TTCTheo's Typesafe Cult
Created by Урош on 7/17/2024 in #questions
Losing typesafety after wrapping json import in a function
Solved it. The locale expects a key or either 'en' or 'nl' so a union of those to as paramaters will solve the type safety issue but does anyone perhaps know why that is needed and just writing a string doesn't solve the issue?
4 replies