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

add --keepDecorators compile option #38708

Closed
kingsimba opened this issue May 21, 2020 · 1 comment
Closed

add --keepDecorators compile option #38708

kingsimba opened this issue May 21, 2020 · 1 comment

Comments

@kingsimba
Copy link

kingsimba commented May 21, 2020

As #22980 has pointed out. There is a sound logic for lossing decorators in declaration file ".d.ts".

But in my opinion, some decorators do provide useful information for readers. For example:

@expose({name: "sockFile", since: 2.0})
domainSocketFile: string

It tells me that when serialize to JSON, it will be renamed to "sockFile", and it will only be serialized after version 2.0

Suggestion

I'd suggest
keepDecorators: never = default
keepDecorators: declaration = put decorator in .d.ts files. Perhaps in comments?

@kingsimba
Copy link
Author

I think "design time decorator" #2900 can fit my need.

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

No branches or pull requests

1 participant