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-uninitialized rule false positive #8

Open
NN--- opened this issue Jan 28, 2018 · 0 comments
Open

no-uninitialized rule false positive #8

NN--- opened this issue Jan 28, 2018 · 0 comments

Comments

@NN---
Copy link

NN--- commented Jan 28, 2018

Bug Report

  • TSLint version: 5.9.1
  • TypeScript version: 2.6.2
  • Running TSLint via: (pick one) gulp

TypeScript code being linted

class A {
 public readonly x: () => string;
 
 constructor() {
  try { 
   x = () => "A";
  } catch (e) {
  }
 }
}

with tslint.json configuration:

{"rules": {
"no-uninitialized": [true, "properties"]
}}

Actual behavior

Error about uninitialized 'x'.

Expected behavior

No error since it is initialized.

From: palantir/tslint#3680

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant