Skip to content

Commit ca86dc4

Browse files
committed
Test:jsdoc nullable syntax legal in type arguments
And update baselines
1 parent 71c5b1b commit ca86dc4

File tree

7 files changed

+18
-50
lines changed

7 files changed

+18
-50
lines changed

tests/baselines/reference/checkJsdocTypeTag3.errors.txt

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

tests/baselines/reference/checkJsdocTypeTag3.js

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/jsdoc/test.js ===
2+
/** @type {Array<?number>} */
3+
var nns;
4+
>nns : Symbol(nns, Decl(test.js, 1, 3))
5+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/jsdoc/test.js ===
2+
/** @type {Array<?number>} */
3+
var nns;
4+
>nns : number[]
5+

tests/baselines/reference/thisTypeInFunctionsNegative.errors.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(169,20): e
8484
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(169,23): error TS1003: Identifier expected.
8585
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(169,27): error TS1005: ',' expected.
8686
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(170,23): error TS1005: ',' expected.
87-
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(170,24): error TS1138: Parameter declaration expected.
8887
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(171,28): error TS1003: Identifier expected.
8988
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(171,32): error TS1005: ',' expected.
9089
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,30): error TS1005: ',' expected.
@@ -94,7 +93,7 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(175,32): e
9493
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(175,35): error TS2304: Cannot find name 'm'.
9594

9695

97-
==== tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts (60 errors) ====
96+
==== tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts (59 errors) ====
9897
class C {
9998
n: number;
10099
explicitThis(this: this, m: number): number {
@@ -403,8 +402,6 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(175,35): e
403402
function optional(this?: C): number { return this.n; }
404403
~
405404
!!! error TS1005: ',' expected.
406-
~
407-
!!! error TS1138: Parameter declaration expected.
408405
function decorated(@deco() this: C): number { return this.n; }
409406
~~~~
410407
!!! error TS1003: Identifier expected.

tests/baselines/reference/thisTypeInFunctionsNegative.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ function modifiers(, C) {
345345
return this.n;
346346
}
347347
function restParam(C) { return this.n; }
348-
function optional(C) { return this.n; }
348+
function optional() { return this.n; }
349349
function decorated(, C) {
350350
if ( === void 0) { = this; }
351351
return this.n;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// @Filename:test.js
2+
// @checkJs: true
3+
// @allowJs: true
4+
// @noEmit: true
5+
/** @type {Array<?number>} */
6+
var nns;

0 commit comments

Comments
 (0)