Skip to content

Commit 791ae5b

Browse files
committed
Accept new baselines
1 parent e1d5bdf commit 791ae5b

7 files changed

+12
-15
lines changed

tests/baselines/reference/constDeclarations-ambient-errors.errors.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
tests/cases/compiler/constDeclarations-ambient-errors.ts(3,27): error TS1039: Initializers are not allowed in ambient contexts.
22
tests/cases/compiler/constDeclarations-ambient-errors.ts(4,26): error TS1039: Initializers are not allowed in ambient contexts.
3-
tests/cases/compiler/constDeclarations-ambient-errors.ts(5,18): error TS1039: Initializers are not allowed in ambient contexts.
3+
tests/cases/compiler/constDeclarations-ambient-errors.ts(5,20): error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal.
44
tests/cases/compiler/constDeclarations-ambient-errors.ts(5,37): error TS1039: Initializers are not allowed in ambient contexts.
55
tests/cases/compiler/constDeclarations-ambient-errors.ts(5,51): error TS1039: Initializers are not allowed in ambient contexts.
6-
tests/cases/compiler/constDeclarations-ambient-errors.ts(8,14): error TS1039: Initializers are not allowed in ambient contexts.
76
tests/cases/compiler/constDeclarations-ambient-errors.ts(9,22): error TS1039: Initializers are not allowed in ambient contexts.
87

98

10-
==== tests/cases/compiler/constDeclarations-ambient-errors.ts (7 errors) ====
9+
==== tests/cases/compiler/constDeclarations-ambient-errors.ts (6 errors) ====
1110

1211
// error: no intialization expected in ambient declarations
1312
declare const c1: boolean = true;
@@ -17,17 +16,15 @@ tests/cases/compiler/constDeclarations-ambient-errors.ts(9,22): error TS1039: In
1716
~
1817
!!! error TS1039: Initializers are not allowed in ambient contexts.
1918
declare const c3 = null, c4 :string = "", c5: any = 0;
20-
~
21-
!!! error TS1039: Initializers are not allowed in ambient contexts.
19+
~~~~
20+
!!! error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal.
2221
~
2322
!!! error TS1039: Initializers are not allowed in ambient contexts.
2423
~
2524
!!! error TS1039: Initializers are not allowed in ambient contexts.
2625

2726
declare module M {
2827
const c6 = 0;
29-
~
30-
!!! error TS1039: Initializers are not allowed in ambient contexts.
3128
const c7: number = 7;
3229
~
3330
!!! error TS1039: Initializers are not allowed in ambient contexts.

tests/baselines/reference/constDeclarations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ for (const c5 = 0, c6 = 0; c5 < c6;) {
2727
//// [constDeclarations.d.ts]
2828
declare const c1: boolean;
2929
declare const c2: number;
30-
declare const c3: number, c4: string, c5: any;
30+
declare const c3 = 0, c4: string, c5: any;

tests/baselines/reference/constDeclarations2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ var M;
2222
declare module M {
2323
const c1: boolean;
2424
const c2: number;
25-
const c3: number, c4: string, c5: any;
25+
const c3 = 0, c4: string, c5: any;
2626
}

tests/baselines/reference/declarationEmitClassMemberNameConflict2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var Foo = (function () {
4545

4646

4747
//// [declarationEmitClassMemberNameConflict2.d.ts]
48-
declare const Bar: string;
48+
declare const Bar = "bar";
4949
declare enum Hello {
5050
World = 0,
5151
}

tests/baselines/reference/shorthandOfExportedEntity01_targetES2015_CommonJS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ exports.foo = foo;
1717

1818

1919
//// [shorthandOfExportedEntity01_targetES2015_CommonJS.d.ts]
20-
export declare const test: string;
20+
export declare const test = "test";
2121
export declare function foo(): void;

tests/baselines/reference/shorthandOfExportedEntity02_targetES5_CommonJS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ exports.foo = foo;
1717

1818

1919
//// [shorthandOfExportedEntity02_targetES5_CommonJS.d.ts]
20-
export declare const test: string;
20+
export declare const test = "test";
2121
export declare function foo(): void;

tests/baselines/reference/stringLiteralTypesOverloads02.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ declare function getFalsyPrimitive(x: "number" | "string"): number | string;
100100
declare function getFalsyPrimitive(x: "number" | "string" | "boolean"): number | string | boolean;
101101
declare namespace Consts1 {
102102
}
103-
declare const string: string;
104-
declare const number: string;
105-
declare const boolean: string;
103+
declare const string = "string";
104+
declare const number = "number";
105+
declare const boolean = "boolean";
106106
declare const stringOrNumber: string;
107107
declare const stringOrBoolean: string;
108108
declare const booleanOrNumber: string;

0 commit comments

Comments
 (0)