Address CR feedback

This commit is contained in:
Anders Hejlsberg
2017-08-07 13:59:52 -07:00
parent c938a2acdc
commit 3efeb1e27f
3 changed files with 4 additions and 4 deletions
@@ -15,7 +15,7 @@ tests/cases/compiler/indexSignatureAndMappedType.ts(16,5): error TS2322: Type '{
!!! error TS2322: Type '{ [key: string]: T; }' is not assignable to type 'Record<K, T>'.
}
function f2<T, K extends string>(x: { [key: string]: T }, y: Record<string, T>) {
function f2<T>(x: { [key: string]: T }, y: Record<string, T>) {
x = y;
y = x;
}
@@ -7,7 +7,7 @@ function f1<T, K extends string>(x: { [key: string]: T }, y: Record<K, T>) {
y = x; // Error
}
function f2<T, K extends string>(x: { [key: string]: T }, y: Record<string, T>) {
function f2<T>(x: { [key: string]: T }, y: Record<string, T>) {
x = y;
y = x;
}
@@ -55,7 +55,7 @@ function f3(x, y) {
declare function f1<T, K extends string>(x: {
[key: string]: T;
}, y: Record<K, T>): void;
declare function f2<T, K extends string>(x: {
declare function f2<T>(x: {
[key: string]: T;
}, y: Record<string, T>): void;
declare function f3<T, U, K extends string>(x: {
@@ -9,7 +9,7 @@ function f1<T, K extends string>(x: { [key: string]: T }, y: Record<K, T>) {
y = x; // Error
}
function f2<T, K extends string>(x: { [key: string]: T }, y: Record<string, T>) {
function f2<T>(x: { [key: string]: T }, y: Record<string, T>) {
x = y;
y = x;
}