Throw an error for a declare class field that have an initializer (#12093)

This commit is contained in:
Sosuke Suzuki
2020-09-22 22:23:58 +09:00
committed by GitHub
parent 3628c52867
commit cb4e436018
2 changed files with 4 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
{
"type": "File",
"start":0,"end":43,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
"errors": [
"SyntaxError: 'declare' class fields cannot have an initializer (2:22)"
],
"program": {
"type": "Program",
"start":0,"end":43,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},