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

[no-untyped-public-signature] Requires return type on setters, which cannot have a return type #1263

Closed
glen-84 opened this issue Nov 26, 2019 · 0 comments · Fixed by #1264
Closed
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@glen-84
Copy link
Contributor

glen-84 commented Nov 26, 2019

Repro

{
  "rules": {
    "@typescript-eslint/no-untyped-public-signature": "error"
  }
}
class Example {
    private _x: string;

    public get x(): string {
        return this._x;
    }

    public set x(x: string) {
        this._x = x;
    }
}

Expected Result

No errors.

Actual Result

Error: Public method has no return type

Additional Info

Related to #1229.

Versions

package version
@typescript-eslint/eslint-plugin 2.9.0
@typescript-eslint/parser 2.9.0
TypeScript 3.4.5
ESLint 6.7.1
node 12.13.1
npm 6.12.1
@glen-84 glen-84 added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Nov 26, 2019
@bradzacher bradzacher added bug Something isn't working and removed triage Waiting for maintainers to take a look labels Nov 26, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants