Add visitor key for Flow typeArguments in call expressions (#8273)

| Q                        | A <!--(Can use an emoji 👍) -->
| ------------------------ | ---
| Fixed Issues?            | Fixes #8272 <!-- remove the (`) quotes to link the issues -->
| Patch: Bug Fix?          | Yes
| Major: Breaking Change?  |
| Minor: New Feature?      |
| Tests Added + Pass?      | Yes
| Documentation PR         | <!-- If so, add `[skip ci]` to your commit message to skip CI -->
| Any Dependency Changes?  |
| License                  | MIT

The visitor for `typeArguments` in function calls wasn't set in the definition, so type annotations added there weren't visited.

This is required to fix https://github.com/babel/babel-eslint/issues/644
This commit is contained in:
Rubén Norte 2018-07-05 20:58:15 +01:00 committed by Brian Ng
parent f70d7c8dfe
commit 85b7154f91
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ defineType("BreakStatement", {
});
defineType("CallExpression", {
visitor: ["callee", "arguments", "typeParameters"],
visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
builder: ["callee", "arguments"],
aliases: ["Expression"],
fields: {

View File

@ -87,7 +87,7 @@ defineType("OptionalMemberExpression", {
});
defineType("OptionalCallExpression", {
visitor: ["callee", "arguments", "typeParameters"],
visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
builder: ["callee", "arguments", "optional"],
aliases: ["Expression"],
fields: {