We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
setter without getter
4.8.0-dev.20220527
Playground link with relevant code
class Foo { set foo(value: string) {} } const foo = new Foo() console.log(foo.foo.toUpperCase()) // runtime error
no error
either an error when defining the setter if it shouldn't be allowed, or an error when accessing the foo property (as its type is undefined)
foo
undefined
The text was updated successfully, but these errors were encountered:
Duplicate of #30852. Check out the ESLint rule accessor-pairs.
Sorry, something went wrong.
thanks. btw the open issue is #21759
No branches or pull requests
Bug Report
π Search Terms
setter without getter
π Version & Regression Information
4.8.0-dev.20220527
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
no error
π Expected behavior
either an error when defining the setter if it shouldn't be allowed, or an error when accessing the
foo
property (as its type isundefined
)The text was updated successfully, but these errors were encountered: