Skip to content

fix: Unable to resolve signature of property decorator when called as an expression. #1146

@zhengAnBin

Description

@zhengAnBin

Description

Use Class-Validator in DTOs

Minimal code-snippet showcasing the problem

@isNotEmpty({ message: '' })  // ts error
@ApiProperty({ description: '手机号', example: '13222222222', required: true })
phone: number;

Actual behavior

ts:
Unable to resolve signature of property decorator when called as an expression.
This expression is not callable.
Type 'Boolean' has no call signatures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions