Skip to content
New issue

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

Clarify emitDecoratorMetadata requirement in getting-started #78

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

aldenquimby
Copy link
Contributor

@aldenquimby aldenquimby commented Jun 27, 2023

Follows #77

Fully addresses lukeautry/tsoa#1443

Why consider this change?

  • emitDecoratorMetadata has significant consequences for output JS
    • TypeScript-only changes (e.g. changing type signature, import vs import type, etc) are no longer build-only risks. They can now impact runtime code when you have this setting enabled
  • emitDecoratorMetadata is particularly troublesome with isolatedModules, which is required by projects like esbuild, vite, swc, babel, next.js, and create-react-app
  • see this eslint bug thread for an example deep dive into problems
  • because of these complexities, any library that uses decorators should ideally clarify if emitDecoratorMetadata is required or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants