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
toJS
modular
import { ... } from './data-contracts'
Hi, there.
Using with toJS and modular, import { ... } from './data-contracts' is disappeared. Without toJS, it seems to be going well.
I don't know why it's fine, doing like below.
// src/translators/javascript.ts ... export class JavascriptTranslator extends Translator { ... translate = async (input) => { const compiled = this.compileTSCode(input); const jsFileName = `${input.fileName}${typescript.Extension.Js}`; const dtsFileName = `${input.fileName}${typescript.Extension.Dts}`; const sourceContent = compiled[jsFileName]; const tsImportRows = input.fileContent .split("\n") .filter((line) => line.startsWith("import ")); const declarationContent = compiled[dtsFileName] .split("\n") .map((line) => { // I commented out this lines. // if (line.startsWith("import ")) { // return tsImportRows.shift(); // } return line; }) .join("\n"); return [ { fileName: input.fileName, fileExtension: typescript.Extension.Js, fileContent: await this.codeFormatter.formatCode(sourceContent), }, { fileName: input.fileName, fileExtension: typescript.Extension.Dts, fileContent: await this.codeFormatter.formatCode(declarationContent), }, ]; }; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, there.
Using with
toJS
andmodular
,import { ... } from './data-contracts'
is disappeared.Without
toJS
, it seems to be going well.I don't know why it's fine, doing like below.
The text was updated successfully, but these errors were encountered: