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

feat: apply all decorators with return type PropertyDecorator #555

Closed
Dominic-Preap opened this issue Mar 19, 2020 · 1 comment
Closed
Labels
status: done/released Issue has been completed, no further action is needed. type: feature Issues related to new features.

Comments

@Dominic-Preap
Copy link

I would propose all decorators should return PropertyDecorator because this is standard type from typescript and useful when using applyDecorators function from @nestjs. I'll make a PR for that as well.

export const IsOptionalArrayNumber = () =>
  applyDecorators(
    IsOptional() as any, // <--- if it is PropertyDecorator type, it's very useful
    IsArray() as any,
    IsNumber() as any,
    ApiPropertyOptional() // <-- @nestjs decorators also a PropertyDecorator type
  );
@lock
Copy link

lock bot commented Apr 2, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 2, 2020
@NoNameProvided NoNameProvided changed the title Apply all decorators with return type PropertyDecorator feat: apply all decorators with return type PropertyDecorator Aug 8, 2020
@NoNameProvided NoNameProvided added type: feature Issues related to new features. status: done/released Issue has been completed, no further action is needed. labels Aug 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: done/released Issue has been completed, no further action is needed. type: feature Issues related to new features.
Development

No branches or pull requests

2 participants