You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export const FooFoo = buildFoo('Foo') as unknown as (foo: any) => Foo | FooLegacy;
What ast-explorer shows is that the TSUnionType node is on the returnType attribute of the TSFunctionType node:
However when using jscodeshift with recast/ast-types it's being parsed as the following:
instead of being on the tsFunctionTypeNode.returnType.typeAnnotation attribute, it's actually structured as tsFunctionTypeNode.typeAnnotation.typeAnnotation
The text was updated successfully, but these errors were encountered:
Given the following code:
What ast-explorer shows is that the

TSUnionType
node is on thereturnType
attribute of theTSFunctionType
node:However when using jscodeshift with recast/ast-types it's being parsed as the following:

instead of being on the
tsFunctionTypeNode.returnType.typeAnnotation
attribute, it's actually structured astsFunctionTypeNode.typeAnnotation.typeAnnotation
The text was updated successfully, but these errors were encountered: