Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Commit 801d655

Browse files
azzJamesHenry
authored andcommitted
Breaking: Support TypeScript 2.5 (fixes #368) (#369)
1 parent 01c34f4 commit 801d655

File tree

6 files changed

+486
-3
lines changed

6 files changed

+486
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A parser that converts TypeScript into an [ESTree](https://github.com/estree/est
88

99
We will always endeavor to support the latest stable version of TypeScript.
1010

11-
The version of TypeScript currently supported by this parser is `~2.4.0`. This is reflected in the `devDependency` requirement within the package.json file, and it is what the tests will be run against. We have an open `peerDependency` requirement in order to allow for experimentation on newer/beta versions of TypeScript.
11+
The version of TypeScript currently supported by this parser is `~2.5.1`. This is reflected in the `devDependency` requirement within the package.json file, and it is what the tests will be run against. We have an open `peerDependency` requirement in order to allow for experimentation on newer/beta versions of TypeScript.
1212

1313
If you use a non-supported version of TypeScript, the parser will log a warning to the console.
1414

lib/convert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ module.exports = function convert(config) {
513513
case SyntaxKind.CatchClause:
514514
Object.assign(result, {
515515
type: AST_NODE_TYPES.CatchClause,
516-
param: convertChild(node.variableDeclaration.name),
516+
param: node.variableDeclaration ? convertChild(node.variableDeclaration.name) : null,
517517
body: convertChild(node.block)
518518
});
519519
break;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"npm-license": "0.3.3",
3131
"shelljs": "0.7.7",
3232
"shelljs-nodecli": "0.1.1",
33-
"typescript": "~2.4.0"
33+
"typescript": "~2.5.1"
3434
},
3535
"keywords": [
3636
"ast",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
try {} catch {} finally {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
try {} catch {}

0 commit comments

Comments
 (0)