Skip to content

[no-unsafe-assignment] doesn't handle interface implementation #40

@danielnixon

Description

@danielnixon

From microsoft/TypeScript#18770 (comment)

type I = {
  readonly a: string;
};

// eslint-disable-next-line functional/no-class
class C implements I {
  // This should be flagged by no-unsafe-assignment or another (new) rule
  // eslint-disable-next-line functional/prefer-readonly-type
  a = "";
}

const D = new C();

// eslint-disable-next-line functional/no-expression-statement, functional/immutable-data
D.a = "something";

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions