Skip to content

Commit ea4e3af

Browse files
committed
Fix tests
1 parent 49dd54e commit ea4e3af

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ enum E {
55
b = 1
66
}
77
var x = E;
8-
var x: { a: E; b: E;[x: number]: string; }; // Shouldnt error
8+
var x: { readonly a: E; readonly b: E; readonly [x: number]: string; }; // Shouldnt error
99
var y = E;
10-
var y: { a: E; b: E;[x: number]: string;[x: number]: string } // two errors: the types are not identical and duplicate signatures
10+
var y: { readonly a: E; readonly b: E; readonly [x: number]: string; readonly [x: number]: string } // two errors: the types are not identical and duplicate signatures

tests/cases/conformance/enums/enumBasics.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ var x: number = E1.A;
1111
// Enum object type is anonymous with properties of the enum type and numeric indexer
1212
var e = E1;
1313
var e: {
14-
A: E1;
15-
B: E1;
16-
C: E1;
17-
[n: number]: string;
14+
readonly A: E1;
15+
readonly B: E1;
16+
readonly C: E1;
17+
readonly [n: number]: string;
1818
};
1919
var e: typeof E1;
2020

tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ var callSig3: { num: (n: number) => string; };
1616

1717
// Get accessor only, type of the property is the annotated return type of the get accessor
1818
var getter1 = { get x(): string { return undefined; } };
19-
var getter1: { x: string; }
19+
var getter1: { readonly x: string; }
2020

2121
// Get accessor only, type of the property is the inferred return type of the get accessor
2222
var getter2 = { get x() { return ''; } };
23-
var getter2: { x: string; }
23+
var getter2: { readonly x: string; }
2424

2525
// Set accessor only, type of the property is the param type of the set accessor
2626
var setter1 = { set x(n: number) { } };

tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
////var /*2*/x = point./*3*/x;
1010

1111
goTo.marker('1');
12-
verify.quickInfoIs("function makePoint(x: number): {\n x: number;\n}", undefined);
12+
verify.quickInfoIs("function makePoint(x: number): {\n readonly x: number;\n}", undefined);
1313

1414
goTo.marker('2');
1515
verify.quickInfoIs("var x: number", undefined);
@@ -18,4 +18,4 @@ goTo.marker('3');
1818
verify.memberListContains("x", "(property) x: number", undefined);
1919

2020
goTo.marker('4');
21-
verify.quickInfoIs("var point: {\n x: number;\n}", undefined);
21+
verify.quickInfoIs("var point: {\n readonly x: number;\n}", undefined);

0 commit comments

Comments
 (0)