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
Babel 7 parses typescript and can confirm that they refuse to implement namespaces due to the fact that they are legacy. babel/babel#8244
When parsing from JSON schema to typescript the Convert function is wrapped in a namespace.
Convert
Solution:
Refactor the Convert function to be a const instead of a namespace. Do not export any of the helpers still.
before:
export namespace Convert { export function toThing(data: string): Thing {...} export function thingToJSON(data: Thing): string {...} }
after:
export const Convert = { toThing() {...} thingToJSON() {...} } // rest of the helpers go here and are not exported
The text was updated successfully, but these errors were encountered:
Would you consider contributing a PR that does this? We'd love to help you along. The code that emits TypeScript is here and here.
Sorry, something went wrong.
Sounds good to me. I'll talk a look at this
No branches or pull requests
Babel 7 parses typescript and can confirm that they refuse to implement namespaces due to the fact that they are legacy. babel/babel#8244
When parsing from JSON schema to typescript the
Convert
function is wrapped in a namespace.Solution:
Refactor the Convert function to be a const instead of a namespace. Do not export any of the helpers still.
before:
after:
The text was updated successfully, but these errors were encountered: