Skip to content

Check non-undefined properties are initialized in the constructor with --strictNullChecks #8476

Closed
@mhegazy

Description

@mhegazy
class C {
   p: number; // Should be an error under --strictNullChecks
   method() {
    this.p; 
  }
}

Metadata

Metadata

Assignees

Labels

FixedA 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