Language: Typescript.
Minimal reproduction case:
class Foo<T extends Record<string, unknown>> {
constructor(private readonly foo: T) {}
reproduction<Key extends keyof T>(key: Key) {
// ESLint: Remove this "===" check; it will always be false. Did you mean to use "=="? (sonarjs/ different-types-comparison)
return this.foo[key] === 'foo';
}
}