ast-types
ast-types copied to clipboard
Support type arguments in CallExpression
Is it possible to add to both flow and typescript?
Can you give an example of what you'd like to be able to do?
Build CallExpression ast with type arguments
foo<string>('baz')
@benjamn any idea?
This issue prevents type parameters identifiers from being found (e.g. using jscodeshift's .find(Identifier)) when they are attached to CallExpressions or NewExpressions. It also results in typeParameters not being present on the type definitions for CallExpression and NewExpression, even though they are there at runtime.
just bumped into this issue as well, basically it was impossible to get root.find(jscodeshift.TSTypeParameterInstantiation) to select Foo in runFoo<Foo>()
I'm also hitting this issue. @shogunsea did you find a workaround?
@mikepink no I didn't, ended up treating those cases like edge cases I had to manually fix