We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This plugin can output code with a syntax error. Taking the following TypeScript code as input:
toto = (function () { // tata } as any)
The following output is emitted by the plugin:
[...] toto = (function () { cov_131zeqpl6j().f[0]++; } // tata as any);
As you can see, the comment has been moved outside the function, and now the as operator is on a new line. It seems that this syntax is not supported by typescript.
as
Minimal Node.js script to reproduce:
const { transformSync } = require("@babel/core"); const result = transformSync( ` toto = (function () { // tata } as any) `, { filename: "toto.ts", plugins: [["@babel/plugin-syntax-typescript"], ["istanbul"]], } ); console.log(result.code);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This plugin can output code with a syntax error. Taking the following TypeScript code as input:
The following output is emitted by the plugin:
As you can see, the comment has been moved outside the function, and now the
as
operator is on a new line. It seems that this syntax is not supported by typescript.Minimal Node.js script to reproduce:
The text was updated successfully, but these errors were encountered: