[Discussion]: export decorators typings
See original GitHub issueI’m submitting a…
[ ] Regression
[ ] Bug report
[X] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
Decorators typings are not exported such as here, here and here for example.
Expected behavior
I think it would be great if interfaces for this typings could be exposed as decorators are.
Minimal reproduction of the problem with instructions
Try import { SwaggerEnumType } from '@nestjs/swagger'
What is the motivation / use case for changing the behavior?
As these typings are not private (used in decorators), I am wondering if they could be exported ? I think this could be great as I am currently duplicating these models inside my code. As you mentioned in CONTRIBUTING.MD, I think this is a major feature and that’s why I wanted your opinion on this before submitting a PR.
Environment
Nest version: latest
For Tooling issues:
- Node version: 10.15.1
- Platform: Mac, Linux, Windows
Others:
Thanks anyway for the great job
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Top Results From Across the Web
deco before or after export keyword? · Issue #69 - GitHub
export is static, so I think decorating it is impossible. I think that's better to have the class's decorators just before the class...
Read more >A practical guide to TypeScript decorators - LogRocket Blog
TypeScript decorators enable you to do cools things such as calculate execution time, perform runtime type assertion, guard against errors, ...
Read more >Documentation - Decorators - TypeScript
A Decorator is a special kind of declaration that can be attached to a class declaration, method, accessor, property, or parameter. Decorators use...
Read more >Converting TypeScript decorators into static code!
We can do the same with our own decorators by using TypeScript transforms! This post is the story of my adventures with custom...
Read more >Chapter 5. Decorators and advanced types - TypeScript Quickly
What the TypeScript decorators are for; How to create a new type based on an existing one using mapped types; How conditional types...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Added in the
next
version (to install runnpm i @nestjs/swagger@next
). Note: remember to update@nestjs/common
,@nestjs/core
andtypescript
as well to ensure that you’re using the latest versions.Steps to migrate: https://github.com/nestjs/swagger/pull/355#issuecomment-547925879
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.