diff --git a/tests/cases/compiler/indexedAccessTypeConstraints.ts b/tests/cases/compiler/indexedAccessTypeConstraints.ts index c1c1bca198b..aee8b6bcb6e 100644 --- a/tests/cases/compiler/indexedAccessTypeConstraints.ts +++ b/tests/cases/compiler/indexedAccessTypeConstraints.ts @@ -11,7 +11,7 @@ type Data = { }; class Parent { - private data: Data; + constructor(private data: Data) {} getData(): Data { return this.data; } diff --git a/tests/cases/compiler/typeVariableTypeGuards.ts b/tests/cases/compiler/typeVariableTypeGuards.ts index 0a4221c93a0..eb15b8689b6 100644 --- a/tests/cases/compiler/typeVariableTypeGuards.ts +++ b/tests/cases/compiler/typeVariableTypeGuards.ts @@ -7,7 +7,7 @@ interface Foo { } class A

> { - props: Readonly

+ constructor(public props: Readonly

) {} doSomething() { this.props.foo && this.props.foo() }