Skip to content

Commit

Permalink
Update transform_files.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Oct 31, 2022
1 parent 6ebf5ff commit f9071cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/transform_files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,6 @@ function transformClass(type, raw, options = {}) {
`Object.assign(${finalName}.prototype, ${defaultsKey})`;
}

if (type === 'class' /*&& !useExports*/) {
classDirective += `\n/** @todo TODO_JS_MIGRATION remove next line after refactoring build */\n${namespace} = ${name};\n`;
}

let rawFile;

const lastNode = ast.body[ast.body.length - 1];
Expand Down Expand Up @@ -457,6 +453,10 @@ function transformClass(type, raw, options = {}) {
rawFile.indexOf('//@ts-nocheck') === -1 &&
(rawFile = `//@ts-nocheck\n${rawFile}`);

if (type === 'class' /*&& !useExports*/) {
classDirective += `\n\n/** @todo TODO_JS_MIGRATION remove next line after refactoring build */\n${namespace} = ${name};\n`;
}

return {
name,
raw: rawFile,
Expand Down

0 comments on commit f9071cf

Please sign in to comment.