Skip to content

Commit 38ebb1d

Browse files
committed
Tests update after declaration file emit revert
1 parent fdb7a3e commit 38ebb1d

64 files changed

Lines changed: 702 additions & 12 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ interface I {
44
}
55

66
//// [computedPropertyNamesDeclarationEmit3_ES5.js]
7+
8+
9+
//// [computedPropertyNamesDeclarationEmit3_ES5.d.ts]
10+
interface I {
11+
}

tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES6.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ interface I {
44
}
55

66
//// [computedPropertyNamesDeclarationEmit3_ES6.js]
7+
8+
9+
//// [computedPropertyNamesDeclarationEmit3_ES6.d.ts]
10+
interface I {
11+
}

tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ var v: {
55

66
//// [computedPropertyNamesDeclarationEmit4_ES5.js]
77
var v;
8+
9+
10+
//// [computedPropertyNamesDeclarationEmit4_ES5.d.ts]
11+
declare var v: {
12+
};

tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES6.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ var v: {
55

66
//// [computedPropertyNamesDeclarationEmit4_ES6.js]
77
var v;
8+
9+
10+
//// [computedPropertyNamesDeclarationEmit4_ES6.d.ts]
11+
declare var v: {
12+
};

tests/baselines/reference/constEnum2.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,13 @@ const enum D {
2020
// it is an error for a member declaration to specify an expression that isn't classified as a constant enum expression.
2121
// Error : not a constant enum expression
2222
var CONST = 9000 % 2;
23+
24+
25+
//// [constEnum2.d.ts]
26+
declare const CONST: number;
27+
declare const enum D {
28+
d = 10,
29+
e,
30+
f,
31+
g,
32+
}

tests/baselines/reference/constEnumPropertyAccess2.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,16 @@ var g;
3131
g = "string";
3232
function foo(x) { }
3333
2 /* B */ = 3;
34+
35+
36+
//// [constEnumPropertyAccess2.d.ts]
37+
declare const enum G {
38+
A = 1,
39+
B = 2,
40+
C = 3,
41+
D = 2,
42+
}
43+
declare var z: typeof G;
44+
declare var z1: any;
45+
declare var g: G;
46+
declare function foo(x: G): void;

tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ var x = new M.C(); // Declaration file wont get emitted because there are errors
1919
//// [client.js]
2020
///<reference path="declFile.d.ts"/>
2121
var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
22+
23+
24+
//// [client.d.ts]
25+
/// <reference path="declFile.d.ts" />
26+
declare var x: M.C;

tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ var x = new M.C(); // Declaration file wont get emitted because there are errors
1919
//// [out.js]
2020
///<reference path="declFile.d.ts"/>
2121
var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
22+
23+
24+
//// [out.d.ts]
25+
/// <reference path="tests/cases/compiler/declFile.d.ts" />
26+
declare var x: M.C;

tests/baselines/reference/declarationEmitDestructuring2.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,27 @@ function h(_a) {
1717
function h1(_a) {
1818
var a = _a[0], b = _a[1][0], c = _a[2][0][0], _b = _a[3], _c = _b.x, x = _c === void 0 ? 10 : _c, _d = _b.y, y = _d === void 0 ? [1, 2, 3] : _d, _e = _b.z, a1 = _e.a1, b1 = _e.b1;
1919
}
20+
21+
22+
//// [declarationEmitDestructuring2.d.ts]
23+
declare function f({x, y: [a, b, c, d]}?: {
24+
x?: number;
25+
y?: [number, number, number, number];
26+
}): void;
27+
declare function g([a, b, c, d]?: [number, number, number, number]): void;
28+
declare function h([a, [b], [[c]], {x, y: [a, b, c], z: {a1, b1}}]: [any, [any], [[any]], {
29+
x?: number;
30+
y: [any, any, any];
31+
z: {
32+
a1: any;
33+
b1: any;
34+
};
35+
}]): void;
36+
declare function h1([a, [b], [[c]], {x, y, z: {a1, b1}}]: [any, [any], [[any]], {
37+
x?: number;
38+
y?: number[];
39+
z: {
40+
a1: any;
41+
b1: any;
42+
};
43+
}]): void;

tests/baselines/reference/declarationEmitDestructuring4.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,13 @@ function baz3(_a) { }
2626
function baz4(_a) {
2727
var _a = { x: 10 };
2828
}
29+
30+
31+
//// [declarationEmitDestructuring4.d.ts]
32+
declare function baz([]: any[]): void;
33+
declare function baz1([]?: number[]): void;
34+
declare function baz2([[]]?: [number[]]): void;
35+
declare function baz3({}: {}): void;
36+
declare function baz4({}?: {
37+
x: number;
38+
}): void;

0 commit comments

Comments
 (0)