Support type arguments in CallExpression
goodmind opened this issue · comments
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 CallExpression
s or NewExpression
s. 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
Hey all, I bumped into this issue and wanted to add the same while creating an expression such as fileToJSON<UserCreateInput>(data, userFiles, files);
any idea how to workaround this and pass the typeArgument
?
Any help would be appreciated :) Thanks!