9 Replies
type your variables
const ENV = (the_env || 'unspecified') as unknown as ENVIRONMENTS
thank you.
?? Is there a way to just tell the deno checker to ignore it ??
That forces typescript to shut up but it doesn’t mean the code will work.
agreed.
I like to do
type Force = any
then do 5 as Force
when I know something will work but don’t want it to complain.thank you. I understand. so there no way in deno checker to just turn it off for the next line (?)
may I asked you another typing question?
Is there anyway I can get the ENVIRONMENTS type other than manually like this?
You could make environments an enum.
Types of are just meant to be sugar on top to understand things. It will all be stripped when transpiled to js.
Enums will be values you can actually use to check if certain info is correct.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View