Skip to content

Commit 3efeb1e

Browse files
committed
Address CR feedback
1 parent c938a2a commit 3efeb1e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/baselines/reference/indexSignatureAndMappedType.errors.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tests/cases/compiler/indexSignatureAndMappedType.ts(16,5): error TS2322: Type '{
1515
!!! error TS2322: Type '{ [key: string]: T; }' is not assignable to type 'Record<K, T>'.
1616
}
1717

18-
function f2<T, K extends string>(x: { [key: string]: T }, y: Record<string, T>) {
18+
function f2<T>(x: { [key: string]: T }, y: Record<string, T>) {
1919
x = y;
2020
y = x;
2121
}

tests/baselines/reference/indexSignatureAndMappedType.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function f1<T, K extends string>(x: { [key: string]: T }, y: Record<K, T>) {
77
y = x; // Error
88
}
99

10-
function f2<T, K extends string>(x: { [key: string]: T }, y: Record<string, T>) {
10+
function f2<T>(x: { [key: string]: T }, y: Record<string, T>) {
1111
x = y;
1212
y = x;
1313
}
@@ -55,7 +55,7 @@ function f3(x, y) {
5555
declare function f1<T, K extends string>(x: {
5656
[key: string]: T;
5757
}, y: Record<K, T>): void;
58-
declare function f2<T, K extends string>(x: {
58+
declare function f2<T>(x: {
5959
[key: string]: T;
6060
}, y: Record<string, T>): void;
6161
declare function f3<T, U, K extends string>(x: {

tests/cases/compiler/indexSignatureAndMappedType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function f1<T, K extends string>(x: { [key: string]: T }, y: Record<K, T>) {
99
y = x; // Error
1010
}
1111

12-
function f2<T, K extends string>(x: { [key: string]: T }, y: Record<string, T>) {
12+
function f2<T>(x: { [key: string]: T }, y: Record<string, T>) {
1313
x = y;
1414
y = x;
1515
}

0 commit comments

Comments
 (0)