Fix TypeScript readonly error location (#9887)

This commit is contained in:
Brian Ng 2019-04-23 09:47:23 -05:00 committed by Henry Zhu
parent bf17871b82
commit d7757f6d08
5 changed files with 7 additions and 9 deletions

View File

@ -743,7 +743,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
return; return;
default: default:
this.raise( this.raise(
node.operator, node.start,
"'readonly' type modifier is only permitted on array and tuple literal types.", "'readonly' type modifier is only permitted on array and tuple literal types.",
); );
} }

View File

@ -1,7 +1,5 @@
{ {
"sourceType": "module", "sourceType": "module",
"plugins": [ "plugins": ["typescript"],
"typescript" "throws": "'readonly' type modifier is only permitted on array and tuple literal types. (1:11)"
],
"throws": "'readonly' type modifier is only permitted on array and tuple literal types. (1:NaN)"
} }

View File

@ -3,5 +3,5 @@
"plugins": [ "plugins": [
"typescript" "typescript"
], ],
"throws": "'readonly' type modifier is only permitted on array and tuple literal types. (1:NaN)" "throws": "'readonly' type modifier is only permitted on array and tuple literal types. (1:11)"
} }

View File

@ -3,5 +3,5 @@
"plugins": [ "plugins": [
"typescript" "typescript"
], ],
"throws": "'readonly' type modifier is only permitted on array and tuple literal types. (1:NaN)" "throws": "'readonly' type modifier is only permitted on array and tuple literal types. (1:11)"
} }

View File

@ -3,5 +3,5 @@
"plugins": [ "plugins": [
"typescript" "typescript"
], ],
"throws": "'readonly' type modifier is only permitted on array and tuple literal types. (1:NaN)" "throws": "'readonly' type modifier is only permitted on array and tuple literal types. (1:11)"
} }