Skip to content

Commit 43fc3ce

Browse files
committed
More tests for getParameterSymbolFromJSDoc
1 parent 2dcc660 commit 43fc3ce

4 files changed

+34
-0
lines changed

tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ var y;
1010
* @param {boolean!} b
1111
*/
1212
y = function bar(b) {}
13+
14+
/**
15+
* @param {string} s
16+
*/
17+
var one = function (s) { }, two = function (untyped) { };
1318

1419

1520
//// [0.js]
@@ -24,3 +29,7 @@ var y;
2429
* @param {boolean!} b
2530
*/
2631
y = function bar(b) { };
32+
/**
33+
* @param {string} s
34+
*/
35+
var one = function (s) { }, two = function (untyped) { };

tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.symbols

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,12 @@ y = function bar(b) {}
2121
>bar : Symbol(bar, Decl(0.js, 10, 3))
2222
>b : Symbol(b, Decl(0.js, 10, 17))
2323

24+
/**
25+
* @param {string} s
26+
*/
27+
var one = function (s) { }, two = function (untyped) { };
28+
>one : Symbol(one, Decl(0.js, 15, 3))
29+
>s : Symbol(s, Decl(0.js, 15, 20))
30+
>two : Symbol(two, Decl(0.js, 15, 27))
31+
>untyped : Symbol(untyped, Decl(0.js, 15, 44))
32+

tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.types

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,14 @@ y = function bar(b) {}
2424
>bar : (b: boolean) => void
2525
>b : boolean
2626

27+
/**
28+
* @param {string} s
29+
*/
30+
var one = function (s) { }, two = function (untyped) { };
31+
>one : (s: string) => void
32+
>function (s) { } : (s: string) => void
33+
>s : string
34+
>two : (untyped: any) => void
35+
>function (untyped) { } : (untyped: any) => void
36+
>untyped : any
37+

tests/cases/conformance/jsdoc/checkJsdocParamOnVariableDeclaredFunctionExpression.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ var y;
1313
* @param {boolean!} b
1414
*/
1515
y = function bar(b) {}
16+
17+
/**
18+
* @param {string} s
19+
*/
20+
var one = function (s) { }, two = function (untyped) { };

0 commit comments

Comments
 (0)