Skip to content

Should error for @return tag on constructor #20044

@ghost

Description

TypeScript Version: 2.7.0-dev.20171115

Code

class C {
    /** @return {number} */
    constructor() {
    }
}

Expected behavior:

Error: Type annotation cannot appear on a constructor declaration.

Actual behavior:

No error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: JSDocRelates to JSDoc parsing and type generationFixedA PR has been merged for this issueSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions