More tests for getParameterSymbolFromJSDoc

This commit is contained in:
Nathan Shively-Sanders
2017-10-19 16:22:05 -07:00
parent 97a6f14ca2
commit 8cc2af59b1
4 changed files with 34 additions and 0 deletions

View File

@@ -10,6 +10,11 @@ var y;
* @param {boolean!} b
*/
y = function bar(b) {}
/**
* @param {string} s
*/
var one = function (s) { }, two = function (untyped) { };
//// [0.js]
@@ -24,3 +29,7 @@ var y;
* @param {boolean!} b
*/
y = function bar(b) { };
/**
* @param {string} s
*/
var one = function (s) { }, two = function (untyped) { };

View File

@@ -21,3 +21,12 @@ y = function bar(b) {}
>bar : Symbol(bar, Decl(0.js, 10, 3))
>b : Symbol(b, Decl(0.js, 10, 17))
/**
* @param {string} s
*/
var one = function (s) { }, two = function (untyped) { };
>one : Symbol(one, Decl(0.js, 15, 3))
>s : Symbol(s, Decl(0.js, 15, 20))
>two : Symbol(two, Decl(0.js, 15, 27))
>untyped : Symbol(untyped, Decl(0.js, 15, 44))

View File

@@ -24,3 +24,14 @@ y = function bar(b) {}
>bar : (b: boolean) => void
>b : boolean
/**
* @param {string} s
*/
var one = function (s) { }, two = function (untyped) { };
>one : (s: string) => void
>function (s) { } : (s: string) => void
>s : string
>two : (untyped: any) => void
>function (untyped) { } : (untyped: any) => void
>untyped : any

View File

@@ -13,3 +13,8 @@ var y;
* @param {boolean!} b
*/
y = function bar(b) {}
/**
* @param {string} s
*/
var one = function (s) { }, two = function (untyped) { };