Update tests and baselines

This commit is contained in:
Yui T
2017-05-29 20:37:15 -07:00
parent 4838eff2d7
commit 0ead501c86
5 changed files with 44 additions and 30 deletions

View File

@@ -431,28 +431,8 @@
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "any",
"kind": "keyword"
"text": "Function",
"kind": "localName"
}
],
"documentation": [],

View File

@@ -11,6 +11,10 @@ anyT1 = "hi";
const x = (a) => a + 1;
x(1);
/** @type {function} */
const y = (a) => a + 1;
x(1);
/** @type {function (number)} */
const x1 = (a) => a + 1;
x1(0);
@@ -29,6 +33,9 @@ anyT1 = "hi";
/** @type {Function} */
var x = function (a) { return a + 1; };
x(1);
/** @type {function} */
var y = function (a) { return a + 1; };
x(1);
/** @type {function (number)} */
var x1 = function (a) { return a + 1; };
x1(0);

View File

@@ -20,21 +20,30 @@ const x = (a) => a + 1;
x(1);
>x : Symbol(x, Decl(0.js, 9, 5))
/** @type {function} */
const y = (a) => a + 1;
>y : Symbol(y, Decl(0.js, 13, 5))
>a : Symbol(a, Decl(0.js, 13, 11))
>a : Symbol(a, Decl(0.js, 13, 11))
x(1);
>x : Symbol(x, Decl(0.js, 9, 5))
/** @type {function (number)} */
const x1 = (a) => a + 1;
>x1 : Symbol(x1, Decl(0.js, 13, 5))
>a : Symbol(a, Decl(0.js, 13, 12))
>a : Symbol(a, Decl(0.js, 13, 12))
>x1 : Symbol(x1, Decl(0.js, 17, 5))
>a : Symbol(a, Decl(0.js, 17, 12))
>a : Symbol(a, Decl(0.js, 17, 12))
x1(0);
>x1 : Symbol(x1, Decl(0.js, 13, 5))
>x1 : Symbol(x1, Decl(0.js, 17, 5))
/** @type {function (number): number} */
const x2 = (a) => a + 1;
>x2 : Symbol(x2, Decl(0.js, 17, 5))
>a : Symbol(a, Decl(0.js, 17, 12))
>a : Symbol(a, Decl(0.js, 17, 12))
>x2 : Symbol(x2, Decl(0.js, 21, 5))
>a : Symbol(a, Decl(0.js, 21, 12))
>a : Symbol(a, Decl(0.js, 21, 12))
x2(0);
>x2 : Symbol(x2, Decl(0.js, 17, 5))
>x2 : Symbol(x2, Decl(0.js, 21, 5))

View File

@@ -29,6 +29,20 @@ x(1);
>x : Function
>1 : 1
/** @type {function} */
const y = (a) => a + 1;
>y : Function
>(a) => a + 1 : (a: any) => any
>a : any
>a + 1 : any
>a : any
>1 : 1
x(1);
>x(1) : any
>x : Function
>1 : 1
/** @type {function (number)} */
const x1 = (a) => a + 1;
>x1 : (arg0: number) => any

View File

@@ -14,6 +14,10 @@ anyT1 = "hi";
const x = (a) => a + 1;
x(1);
/** @type {function} */
const y = (a) => a + 1;
x(1);
/** @type {function (number)} */
const x1 = (a) => a + 1;
x1(0);