generated from bennycode/ts-node-starter
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I tested the following code in the TypeScript AST Viewer:
const module = await import('./my-function.function'); It shows that this call expression is of type SyntaxKind.ImportKeyword, which isn't currently handled in convertFile.
This snippet could help detect it:
const initializer = declaration.getInitializerIfKind(SyntaxKind.AwaitExpression);
const callExpression = initializer?.getExpressionIfKind(SyntaxKind.CallExpression);
const importExpression = callExpression?.getExpressionIfKind(SyntaxKind.ImportKeyword);Expected output:
const module = await import('./my-function.function.js'); Metadata
Metadata
Assignees
Labels
No labels