Why doesn't google Apps Script support latest javascript features like optional chaining even though it's running on Chrome V8? When optional chaining is used, clasp is throwing an error.
GaxiosError: Syntax error: ParseError: Unexpected token .
The runtime environment is already mentioned in the manifest file appsscript.json
as:
{
...
"runtimeVersion": "V8",
...
}
Optional chaining now works.
Currently, this feature(optional chaining) is not supported. A bug report was raised and was denied by Google:You may however be able to raise a feature request for the same(This is NOT a bug report).