Skip to content

Should error for @return tag on constructor #20044

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

Closed
ghost opened this issue Nov 15, 2017 · 0 comments
Closed

Should error for @return tag on constructor #20044

ghost opened this issue Nov 15, 2017 · 0 comments
Labels
Domain: JSDoc Relates to JSDoc parsing and type generation Fixed A PR has been merged for this issue Suggestion An idea for TypeScript

Comments

@ghost
Copy link

ghost commented Nov 15, 2017

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.

@mhegazy mhegazy added Suggestion An idea for TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation labels Nov 16, 2017
@ghost ghost closed this as completed in #20045 Nov 22, 2017
@mhegazy mhegazy added this to the TypeScript 2.7 milestone Nov 22, 2017
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Nov 22, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Domain: JSDoc Relates to JSDoc parsing and type generation Fixed A PR has been merged for this issue Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

1 participant