Skip to content

Commit

Permalink
Update to typescript@2.7.0 (#27)
Browse files Browse the repository at this point in the history
Fixes: #15
  • Loading branch information
ajafff committed Feb 1, 2018
1 parent 67cc64b commit 7e6d301
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -40,10 +40,10 @@
"nyc": "^11.4.1",
"tslint": "^5.8.0",
"tslint-consistent-codestyle": "^1.11.0",
"typescript": "^2.6.2"
"typescript": "~2.7.1"
},
"peerDependencies": {
"typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >= 2.4.0-dev || >= 2.5.0-dev || >= 2.6.0-dev || >= 2.7.0-dev || >= 2.8.0-dev"
"typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev"
},
"dependencies": {
"tslib": "^1.8.1"
Expand Down
8 changes: 8 additions & 0 deletions test/nameTests.ts
Expand Up @@ -41,6 +41,7 @@ describe('isValidPropertyName', () => {
['false', true],
['catch', true],
['try', true],
['1_2_3', false],
];
for (const test of tests)
assert.equal(isValidPropertyName(test[0]), test[1], test[0]);
Expand Down Expand Up @@ -78,6 +79,7 @@ describe('isValidPropertyAccess', () => {
['false', true],
['catch', true],
['try', true],
['1_2_3', false],
];
for (const test of tests)
assert.equal(isValidPropertyAccess(test[0]), test[1], test[0]);
Expand Down Expand Up @@ -115,6 +117,7 @@ describe('isValidIdentifier', () => {
['false', false],
['catch', false],
['try', false],
['1_2_3', false],
];
for (const test of tests)
assert.equal(isValidIdentifier(test[0]), test[1], test[0]);
Expand Down Expand Up @@ -152,6 +155,11 @@ describe('isValidNumericLiteral', () => {
['false', false],
['catch', false],
['try', false],
['1_2_3', true],
['_1', false],
['1_2_', true],
['1__2', true],
['1_2.3', true],
];
for (const test of tests)
assert.equal(isValidNumericLiteral(test[0]), test[1], test[0]);
Expand Down
3 changes: 2 additions & 1 deletion test/tslint.json
Expand Up @@ -3,6 +3,7 @@
"rules": {
"no-implicit-dependencies": {
"options": "dev"
}
},
"no-unnecessary-type-annotation": false
}
}
2 changes: 1 addition & 1 deletion util/util.ts
Expand Up @@ -802,7 +802,7 @@ export function isExpressionValueUsed(node: ts.Expression): boolean {
case ts.SyntaxKind.VariableDeclaration:
case ts.SyntaxKind.Parameter:
case ts.SyntaxKind.EnumMember:
return (<ts.VariableLikeDeclaration>parent).initializer === node;
return (<ts.HasExpressionInitializer>parent).initializer === node;
case ts.SyntaxKind.ImportEqualsDeclaration:
return (<ts.ImportEqualsDeclaration>parent).moduleReference === node;
case ts.SyntaxKind.CommaListExpression:
Expand Down

0 comments on commit 7e6d301

Please sign in to comment.