Don't check type annotations when deciding params scope (#11349)

* Don't check type annotations when deciding params scope

* Also type params
This commit is contained in:
Nicolò Ribaudo
2020-04-05 23:43:20 +02:00
committed by GitHub
parent aeebc08234
commit 65d09e46a0
7 changed files with 47 additions and 0 deletions

View File

@@ -36,6 +36,9 @@ const iifeVisitor = {
path.stop();
}
},
// type annotations don't use or introduce "real" bindings
"TypeAnnotation|TSTypeAnnotation|TypeParameterDeclaration|TSTypeParameterDeclaration": path =>
path.skip(),
};
export default function convertFunctionParams(path, loose) {