While working on my Angular application, I attempted to utilize the Typescript 3.4 feature known as "const assertion" in the following manner:
const counterSettingsDefaults = { setTo: 10, tickSpeed: 200, increment: 1 } as const;
Unfortunately, this resulted in a compile error stating:
"Cannot find name 'const'.ts(2304)",
This error suggests that the functionality I'm trying to use may not be available.
After checking the versions of Angular and Typescript using ng --version
in powershell, I found the following information:
Angular: 9.0.0-rc.7
typescript: 3.6.4
If this is not supported, what could be causing the problem and where should I investigate further?