diff --git a/package.json b/package.json index 893775b8..847c8f72 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "rollup-plugin-node-resolve": "2.0.0", "rollup-plugin-replace": "1.1.1", "typescript": "2.4.0", - "typescript-eslint-parser": "git://github.com/eslint/typescript-eslint-parser.git#6da23fd004ea60b84a5cfff469c89e93c0770b6f", + "typescript-eslint-parser": "git://github.com/eslint/typescript-eslint-parser.git#479b592c0ad84a6ec5170fbe1821ed5ca90c4ee1", "uglify-es": "3.0.15", "webpack": "2.6.1" }, diff --git a/src/fast-path.js b/src/fast-path.js index c734de4d..b87e983f 100644 --- a/src/fast-path.js +++ b/src/fast-path.js @@ -345,7 +345,8 @@ FastPath.prototype.needsParens = function(options) { case "TSParenthesizedType": { if ( - (parent.type === "VariableDeclarator" || + (parent.type === "TypeParameter" || + parent.type === "VariableDeclarator" || parent.type === "TypeAnnotation" || parent.type === "GenericTypeAnnotation") && (node.typeAnnotation.type === "TypeAnnotation" && diff --git a/yarn.lock b/yarn.lock index 64dd6724..789e845b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3589,9 +3589,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -"typescript-eslint-parser@git://github.com/eslint/typescript-eslint-parser.git#6da23fd004ea60b84a5cfff469c89e93c0770b6f": +"typescript-eslint-parser@git://github.com/eslint/typescript-eslint-parser.git#479b592c0ad84a6ec5170fbe1821ed5ca90c4ee1": version "3.0.0" - resolved "git://github.com/eslint/typescript-eslint-parser.git#6da23fd004ea60b84a5cfff469c89e93c0770b6f" + resolved "git://github.com/eslint/typescript-eslint-parser.git#479b592c0ad84a6ec5170fbe1821ed5ca90c4ee1" dependencies: lodash.unescape "4.0.1" semver "5.3.0"