Skip to content

fixAddMissingMember should create a constructor if not present #20331

Closed
@ghost

Description

TypeScript Version: 2.7.0-dev.20171129

Code

a.js

class C {
    m() {
        this.x;
    }
}

Expected behavior:

Can fix the error by creating a constructor.

Actual behavior:

No codefix unless I manually add a constructor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureDomain: Quick FixesEditor-provided fixes, often called code actions.SuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions