Skip to content

[REQ] [typescript-fetch] Make code compile with "erasableSyntaxOnly": true #22400

@tomsontom

Description

@tomsontom

Describe the solution you'd like

It would be nice if the generated code could run without transpilation (eg directly executing it in node). Since Typescript 5.8. there's a compiler option to enforce this named "erasableSyntaxOnly". See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-8.html#the---erasablesyntaxonly-option

It looks like the only problem in the generated code patterns like the following

constructor(private configuration: ConfigurationParameters = {}) {}

in the runtime.ts.

Describe alternatives you've considered

The only possible solution is to patch the runtime manually.

Additional context

As outlined above if the generated code passes "erasableSyntaxOnly": true it is possible to run it directly on NodeJS, removing the need to transpile it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions