Skip to content

Commit 45813bb

Browse files
committed
update baseline
1 parent 3f66a41 commit 45813bb

File tree

52 files changed

+234
-448
lines changed

Some content is hidden

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

52 files changed

+234
-448
lines changed

testdata/baselines/reference/submodule/compiler/declarationEmitClassSetAccessorParamNameInJs2.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ export declare class Foo {
2020
*
2121
* @param {{ prop: string }} baz Baz.
2222
*/
23-
set bar({}: {});
23+
set bar({}: {
24+
prop: string;
25+
});
2426
}

testdata/baselines/reference/submodule/compiler/declarationEmitClassSetAccessorParamNameInJs2.js.diff

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,4 @@
88
+export declare class Foo {
99
/**
1010
* Bar.
11-
*
12-
* @param {{ prop: string }} baz Baz.
13-
*/
14-
- set bar({}: {
15-
- prop: string;
16-
- });
17-
+ set bar({}: {});
18-
}
11+
*

testdata/baselines/reference/submodule/compiler/declarationEmitClassSetAccessorParamNameInJs3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ export declare class Foo {
2121
* @param {{ prop: string | undefined }} baz Baz.
2222
*/
2323
set bar({ prop }: {
24-
prop?: string;
24+
prop: string | undefined;
2525
});
2626
}

testdata/baselines/reference/submodule/compiler/declarationEmitClassSetAccessorParamNameInJs3.js.diff

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,4 @@
88
+export declare class Foo {
99
/**
1010
* Bar.
11-
*
12-
* @param {{ prop: string | undefined }} baz Baz.
13-
*/
14-
set bar({ prop }: {
15-
- prop: string | undefined;
16-
+ prop?: string;
17-
});
18-
}
11+
*

testdata/baselines/reference/submodule/compiler/jsdocParamTagInvalid.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
=== /a.js ===
44
/** @param {string} colour */
55
function f(color) {}
6-
>f : (color: string) => void
7-
>color : string
6+
>f : (color: any) => void
7+
>color : any
88

testdata/baselines/reference/submodule/conformance/jsDeclarationsMissingTypeParameters.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ function x(y) { }
1212
/** @param {function (Array)} func Invoked
1313
*/
1414
function y(func) { return; }
15-
>y : (func: function) => void
16-
>func : function
15+
>y : (func: any) => void
16+
>func : any
1717

1818
/**
1919
* @return {(Array.<> | null)} list of devices

testdata/baselines/reference/submodule/conformance/jsDeclarationsNestedParams.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ declare class X {
6161
* @returns {Promise.<*>} resolves when the event has been sent.
6262
*/
6363
cancel({ reason, code }: {
64-
code: any;
65-
reason: any;
64+
reason: string | null;
65+
code: string | null;
6666
}): Promise<any>;
6767
}
6868
declare class Y {
@@ -76,7 +76,10 @@ declare class Y {
7676
* @returns {Promise.<*>} resolves when the event has been sent.
7777
*/
7878
cancel({ reason, suberr }: {
79-
reason: any;
80-
suberr: any;
79+
reason: string | null;
80+
suberr: {
81+
reason: string | null;
82+
code: string | null;
83+
};
8184
}): Promise<any>;
8285
}

testdata/baselines/reference/submodule/conformance/jsDeclarationsNestedParams.js.diff

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,3 @@
3737
+ async cancel({ reason, suberr }) { }
3838
}
3939

40-
41-
@@= skipped -16, +14 lines =@@
42-
* @returns {Promise.<*>} resolves when the event has been sent.
43-
*/
44-
cancel({ reason, code }: {
45-
- reason: string | null;
46-
- code: string | null;
47-
+ code: any;
48-
+ reason: any;
49-
}): Promise<any>;
50-
}
51-
declare class Y {
52-
@@= skipped -15, +15 lines =@@
53-
* @returns {Promise.<*>} resolves when the event has been sent.
54-
*/
55-
cancel({ reason, suberr }: {
56-
- reason: string | null;
57-
- suberr: {
58-
- reason: string | null;
59-
- code: string | null;
60-
- };
61-
+ reason: any;
62-
+ suberr: any;
63-
}): Promise<any>;
64-
}

testdata/baselines/reference/submodule/conformance/jsDeclarationsRestArgsWithThisTypeInJSDocFunction.errors.txt

Lines changed: 0 additions & 14 deletions
This file was deleted.

testdata/baselines/reference/submodule/conformance/jsDeclarationsRestArgsWithThisTypeInJSDocFunction.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class Clazz {
88
* @param {function(this:Object, ...*):*} functionDeclaration
99
*/
1010
method(functionDeclaration) {}
11-
>method : (functionDeclaration: function) => void
12-
>functionDeclaration : function
11+
>method : (functionDeclaration: any) => void
12+
>functionDeclaration : any
1313
}
1414

testdata/baselines/reference/submodule/conformance/jsdocFunctionType.errors.txt

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
functions.js(2,12): error TS2552: Cannot find name 'function'. Did you mean 'Function'?
21
functions.js(3,13): error TS2552: Cannot find name 'function'. Did you mean 'Function'?
2+
functions.js(5,14): error TS7006: Parameter 'c' implicitly has an 'any' type.
33
functions.js(9,23): error TS7006: Parameter 'n' implicitly has an 'any' type.
4-
functions.js(12,12): error TS2552: Cannot find name 'function'. Did you mean 'Function'?
54
functions.js(13,13): error TS2552: Cannot find name 'function'. Did you mean 'Function'?
5+
functions.js(15,14): error TS7006: Parameter 'c' implicitly has an 'any' type.
66
functions.js(30,12): error TS2552: Cannot find name 'function'. Did you mean 'Function'?
77
functions.js(31,19): error TS7006: Parameter 'ab' implicitly has an 'any' type.
88
functions.js(31,23): error TS7006: Parameter 'onetwo' implicitly has an 'any' type.
9-
functions.js(48,12): error TS2552: Cannot find name 'function'. Did you mean 'Function'?
109
functions.js(49,13): error TS2749: 'D' refers to a value, but is being used as a type here. Did you mean 'typeof D'?
10+
functions.js(51,26): error TS7006: Parameter 'dref' implicitly has an 'any' type.
1111
functions.js(72,14): error TS7019: Rest parameter 'args' implicitly has an 'any[]' type.
1212

1313

1414
==== functions.js (11 errors) ====
1515
/**
1616
* @param {function(this: string, number): number} c is just passing on through
17-
~~~~~~~~
18-
!!! error TS2552: Cannot find name 'function'. Did you mean 'Function'?
19-
!!! related TS2728 lib.es5.d.ts:--:--: 'Function' is declared here.
2017
* @return {function(this: string, number): number}
2118
~~~~~~~~
2219
!!! error TS2552: Cannot find name 'function'. Did you mean 'Function'?
2320
!!! related TS2728 lib.es5.d.ts:--:--: 'Function' is declared here.
2421
*/
2522
function id1(c) {
23+
~
24+
!!! error TS7006: Parameter 'c' implicitly has an 'any' type.
2625
return c
2726
}
2827

@@ -32,15 +31,14 @@ functions.js(72,14): error TS7019: Rest parameter 'args' implicitly has an 'any[
3231

3332
/**
3433
* @param {function(new: { length: number }, number): number} c is just passing on through
35-
~~~~~~~~
36-
!!! error TS2552: Cannot find name 'function'. Did you mean 'Function'?
37-
!!! related TS2728 lib.es5.d.ts:--:--: 'Function' is declared here.
3834
* @return {function(new: { length: number }, number): number}
3935
~~~~~~~~
4036
!!! error TS2552: Cannot find name 'function'. Did you mean 'Function'?
4137
!!! related TS2728 lib.es5.d.ts:--:--: 'Function' is declared here.
4238
*/
4339
function id2(c) {
40+
~
41+
!!! error TS7006: Parameter 'c' implicitly has an 'any' type.
4442
return c
4543
}
4644

@@ -81,14 +79,13 @@ functions.js(72,14): error TS7019: Rest parameter 'args' implicitly has an 'any[
8179

8280
/**
8381
* @param {function(new: D, number)} dref
84-
~~~~~~~~
85-
!!! error TS2552: Cannot find name 'function'. Did you mean 'Function'?
86-
!!! related TS2728 lib.es5.d.ts:--:--: 'Function' is declared here.
8782
* @return {D}
8883
~
8984
!!! error TS2749: 'D' refers to a value, but is being used as a type here. Did you mean 'typeof D'?
9085
*/
9186
var construct = function(dref) { return new dref(33); }
87+
~~~~
88+
!!! error TS7006: Parameter 'dref' implicitly has an 'any' type.
9289
var z3 = construct(D);
9390
z3.length;
9491

testdata/baselines/reference/submodule/conformance/jsdocFunctionType.types

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
* @return {function(this: string, number): number}
77
*/
88
function id1(c) {
9-
>id1 : (c: function) => function
10-
>c : function
9+
>id1 : (c: any) => function
10+
>c : any
1111

1212
return c
13-
>c : function
13+
>c : any
1414
}
1515

1616
var x = id1(function (n) { return this.length + n });
1717
>x : function
1818
>id1(function (n) { return this.length + n }) : function
19-
>id1 : (c: function) => function
19+
>id1 : (c: any) => function
2020
>function (n) { return this.length + n } : (n: any) => any
2121
>n : any
2222
>this.length + n : any
@@ -30,11 +30,11 @@ var x = id1(function (n) { return this.length + n });
3030
* @return {function(new: { length: number }, number): number}
3131
*/
3232
function id2(c) {
33-
>id2 : (c: function) => function
34-
>c : function
33+
>id2 : (c: any) => function
34+
>c : any
3535

3636
return c
37-
>c : function
37+
>c : any
3838
}
3939

4040
class C {
@@ -56,7 +56,7 @@ class C {
5656
var y = id2(C);
5757
>y : function
5858
>id2(C) : function
59-
>id2 : (c: function) => function
59+
>id2 : (c: any) => function
6060
>C : typeof C
6161

6262
var z = new y(12);
@@ -103,7 +103,7 @@ function D(n) {
103103
var y2 = id2(D);
104104
>y2 : function
105105
>id2(D) : function
106-
>id2 : (c: function) => function
106+
>id2 : (c: any) => function
107107
>D : (n: number) => void
108108

109109
var z2 = new y2(33);
@@ -123,17 +123,17 @@ z2.length;
123123
* @return {D}
124124
*/
125125
var construct = function(dref) { return new dref(33); }
126-
>construct : (dref: function) => D
127-
>function(dref) { return new dref(33); } : (dref: function) => D
128-
>dref : function
126+
>construct : (dref: any) => D
127+
>function(dref) { return new dref(33); } : (dref: any) => D
128+
>dref : any
129129
>new dref(33) : any
130-
>dref : function
130+
>dref : any
131131
>33 : 33
132132

133133
var z3 = construct(D);
134134
>z3 : D
135135
>construct(D) : D
136-
>construct : (dref: function) => D
136+
>construct : (dref: any) => D
137137
>D : (n: number) => void
138138

139139
z3.length;
@@ -164,7 +164,7 @@ var E = function(n) {
164164
var y3 = id2(E);
165165
>y3 : function
166166
>id2(E) : function
167-
>id2 : (c: function) => function
167+
>id2 : (c: any) => function
168168
>E : (n: number) => void
169169

170170
// Repro from #39229

testdata/baselines/reference/submodule/conformance/jsdocParamTag2.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ function good9({ a }) {
118118
* @param {string} x
119119
*/
120120
function bad1(x, {a, b}) {}
121-
>bad1 : (x: { a: string; b: string; }, { a, b }: { a: any; b: any; }) => void
122-
>x : { a: string; b: string; }
121+
>bad1 : (x: string, { a, b }: { a: any; b: any; }) => void
122+
>x : string
123123
>a : any
124124
>b : any
125125

@@ -128,8 +128,8 @@ function bad1(x, {a, b}) {}
128128
* @param {{a: string, b: string}} obj
129129
*/
130130
function bad2(x, {a, b}) {}
131-
>bad2 : (x: string, { a, b }: { a: string; b: string; }) => void
132-
>x : string
131+
>bad2 : (x: any, { a, b }: { a: string; b: string; }) => void
132+
>x : any
133133
>a : string
134134
>b : string
135135

testdata/baselines/reference/submodule/conformance/jsdocParseDotDotDotInJSDocFunction.errors.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
a.js(2,13): error TS2552: Cannot find name 'function'. Did you mean 'Function'?
1+
a.js(3,12): error TS7006: Parameter 'callback' implicitly has an 'any' type.
22
a.js(8,12): error TS2552: Cannot find name 'function'. Did you mean 'Function'?
33

44

55
==== a.js (2 errors) ====
66
// from bcryptjs
77
/** @param {function(...[*])} callback */
8-
~~~~~~~~
9-
!!! error TS2552: Cannot find name 'function'. Did you mean 'Function'?
10-
!!! related TS2728 lib.es5.d.ts:--:--: 'Function' is declared here.
118
function g(callback) {
9+
~~~~~~~~
10+
!!! error TS7006: Parameter 'callback' implicitly has an 'any' type.
1211
callback([1], [2], [3])
1312
}
1413

testdata/baselines/reference/submodule/conformance/jsdocParseDotDotDotInJSDocFunction.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
// from bcryptjs
55
/** @param {function(...[*])} callback */
66
function g(callback) {
7-
>g : (callback: function) => void
8-
>callback : function
7+
>g : (callback: any) => void
8+
>callback : any
99

1010
callback([1], [2], [3])
1111
>callback([1], [2], [3]) : any
12-
>callback : function
12+
>callback : any
1313
>[1] : number[]
1414
>1 : 1
1515
>[2] : number[]

testdata/baselines/reference/submodule/conformance/jsdocParseStarEquals.errors.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
a.js(1,5): error TS1047: A rest parameter cannot be optional.
22
a.js(3,12): error TS2370: A rest parameter must be of an array type.
3-
a.js(11,13): error TS2552: Cannot find name 'function'. Did you mean 'Function'?
3+
a.js(12,14): error TS7006: Parameter 'f' implicitly has an 'any' type.
44

55

66
==== a.js (3 errors) ====
@@ -20,9 +20,8 @@ a.js(11,13): error TS2552: Cannot find name 'function'. Did you mean 'Function'?
2020

2121

2222
/** @param {function():*=} f */
23-
~~~~~~~~
24-
!!! error TS2552: Cannot find name 'function'. Did you mean 'Function'?
25-
!!! related TS2728 lib.es5.d.ts:--:--: 'Function' is declared here.
2623
function cbf(f) {
24+
~
25+
!!! error TS7006: Parameter 'f' implicitly has an 'any' type.
2726
}
2827

testdata/baselines/reference/submodule/conformance/jsdocParseStarEquals.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var x;
1717

1818
/** @param {function():*=} f */
1919
function cbf(f) {
20-
>cbf : (f: function) => void
21-
>f : function
20+
>cbf : (f: any) => void
21+
>f : any
2222
}
2323

0 commit comments

Comments
 (0)