Skip to content

Provide a quick fix for uninitalized class properties #21509

@DanielRosenwasser

Description

@DanielRosenwasser
class Point {
    z: string;
    constructor() {
    }
}

We should provide a quick fix here to provide a definite assignment assertion on z under --strictPropertyInitialization. Bonus points if we only provide the quick fix when the property has actually been written to!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: LS: Quick FixesEditor-provided fixes, often called code actions.FixedA PR has been merged for this issueHelp WantedYou can do thisSuggestionAn idea for TypeScript

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions