I am trying to implement TypeScript array to string literal type
I get a red underline error on PhpStorm with the error type name expected
after as const
I also tried <const>
but I get the same error near <
and >
I user typescript 3.8.3
I am trying to implement TypeScript array to string literal type
I get a red underline error on PhpStorm with the error type name expected
after as const
I also tried <const>
but I get the same error near <
and >
I user typescript 3.8.3
Works fine for me:
What IDE version do you use? TypeScript 3.4 non-widening literal contexts ('as const') is supported since 2019.2.1