Skip to content

question: Error with decorator in Typescript: Unable to resolve signature of property decorator when called as an expression.ts(1240) #2593

@wilburfs

Description

@wilburfs

I use the decorator like this:

export class LoginDto {
@isemail({},{message:'hahah'})
email: string

@IsString()
@minlength(6, { message: 'nolonger than 6' })
password:string

constructor(email = '', password = '') {
this.email = email
this.password = password
}
}

and vscode give me the Error with decorator in Typescript: Unable to resolve signature of property decorator when called as an expression.ts(1240)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questionQuestions about the usage of the library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions