Skip to content

Commit

Permalink
Fix TypeScript readonly error location (#9887)
Browse files Browse the repository at this point in the history
  • Loading branch information
existentialism authored and hzoo committed Apr 23, 2019
1 parent bf17871 commit d7757f6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/babel-parser/src/plugins/typescript.js
Expand Up @@ -743,7 +743,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
return;
default:
this.raise(
node.operator,
node.start,
"'readonly' type modifier is only permitted on array and tuple literal types.",
);
}
Expand Down
@@ -1,7 +1,5 @@
{
"sourceType": "module",
"plugins": [
"typescript"
],
"throws": "'readonly' type modifier is only permitted on array and tuple literal types. (1:NaN)"
}
"plugins": ["typescript"],
"throws": "'readonly' type modifier is only permitted on array and tuple literal types. (1:11)"
}
Expand Up @@ -3,5 +3,5 @@
"plugins": [
"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)"
}
Expand Up @@ -3,5 +3,5 @@
"plugins": [
"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)"
}
Expand Up @@ -3,5 +3,5 @@
"plugins": [
"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)"
}

0 comments on commit d7757f6

Please sign in to comment.