javascript icon indicating copy to clipboard operation
javascript copied to clipboard

Should `erasableSyntaxOnly` be enabled

Open cjihrig opened this issue 8 months ago • 3 comments

TypeScript 5.8 added a new compiler option named erasableSyntaxOnly. This option is somewhat of a collaboration with the Node core team as it disallows TypeScript syntax that Node's type stripping does not support.

There are currently 49 errors reported when enabling this option, which is why I'm opening an issue instead of a PR.

If we don't want to work toward enabling it, that's fine, and we can carry on with the status quo. If we do want to enable it, it would lead to a future where we no longer need to transpile for anything except npm publish and running the transpiled tests in the CI.

cjihrig avatar Mar 05 '25 22:03 cjihrig

I'll start working on fixing these, seems like a good idea.

brendandburns avatar Mar 05 '25 23:03 brendandburns

I started looking into this. Mostly the errors are due to the use of automatic member variables via readonly constructor parameters. Those are easy to fix, though they do make the code a little more verbose.

Some of them are due to the use of enums in the generated code. That's going to require upstream changes in the code generator and a regeneration of the code.

I'll send a PR with all of the local fixes sometime in the next day or two, then work on the upstream generator (unless someone else in the community gets there first)

brendandburns avatar Mar 07 '25 15:03 brendandburns

Generator changes are here: https://github.com/OpenAPITools/openapi-generator/pull/21040

brendandburns avatar Apr 05 '25 19:04 brendandburns

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jul 04 '25 19:07 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Aug 03 '25 19:08 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Sep 02 '25 20:09 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Sep 02 '25 20:09 k8s-ci-robot

reopening this while continuing in gen repo pr https://github.com/kubernetes-client/gen/pull/284?

merged generator PR https://github.com/OpenAPITools/openapi-generator/pull/21560

davidgamero avatar Nov 12 '25 21:11 davidgamero

/reopen

davidgamero avatar Nov 12 '25 21:11 davidgamero

@davidgamero: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Nov 12 '25 21:11 k8s-ci-robot