let a;
a ??= 'asd'
console.log(a); // asd
When I run the above js in the browser console without any problems
However, when I run in typescript, an error occurs
SyntaxError: Unexpected token '??='
This is my configuration:
"typescript": "^4.1.3",
"webpack": "^5.11.0",
"webpack-cli": "^4.2.0"
"target": "ESNext",
"module": "ESNext",
I want to use "??=", need to configure webpack or tsconfig, thanks
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…