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
In the generated code, the import statements don't distinguish between runtime values and buildtime types. E.g.
import { Lien, LienSDKType } from './lien.js'; import { JsonSafe } from '../../json-safe.js';
This causes errors with TypeScript verbatimModuleSyntax and libraries like https://bloomberg.github.io/ts-blank-space/ that require it.
verbatimModuleSyntax
In the output precede type imports with type. So for the example above,
type
import { Lien, type LienSDKType } from './lien.js'; import { BinaryReader, BinaryWriter } from '../../binary.js'; import { type JsonSafe } from '../../json-safe.js';
This snippet can be used with child_process exec to clean up the files after they're generated:
child_process
exec
const command = ` find ${fullPath} -type f -exec sed -i '' \ -e 's/import { JsonSafe/import {type JsonSafe/g' \ -e 's/\\([{,]\\) \\([[:alnum:]_]*SDKType\\)/\\1 type \\2/g' {} + `; exec(command);
The text was updated successfully, but these errors were encountered:
NorOldBurden
No branches or pull requests
Problem
In the generated code, the import statements don't distinguish between runtime values and buildtime types. E.g.
This causes errors with TypeScript
verbatimModuleSyntax
and libraries like https://bloomberg.github.io/ts-blank-space/ that require it.Proposed solution
In the output precede type imports with
type
. So for the example above,Fallback
This snippet can be used with
child_process
exec
to clean up the files after they're generated:The text was updated successfully, but these errors were encountered: