Update tests and baselines

This commit is contained in:
Yui T 2017-05-29 21:48:34 -07:00
parent 10eae61aca
commit 5c7c113203
4 changed files with 116 additions and 9 deletions

View file

@ -9,9 +9,26 @@
* *
* @param {Opts} opts * @param {Opts} opts
*/ */
function foo(opts) {} function foo(opts) {
opts.x;
}
foo({x: 'abc'}); foo({x: 'abc'});
/**
* @typedef {object} Opts1
* @property {string} x
* @property {string=} y
* @property {string} [z]
* @property {string} [w="hi"]
*
* @param {Opts1} opts
*/
function foo1(opts) {
opts.x;
}
foo1({x: 'abc'});
//// [0.js] //// [0.js]
// @ts-check // @ts-check
@ -24,5 +41,20 @@ foo({x: 'abc'});
* *
* @param {Opts} opts * @param {Opts} opts
*/ */
function foo(opts) { } function foo(opts) {
opts.x;
}
foo({ x: 'abc' }); foo({ x: 'abc' });
/**
* @typedef {object} Opts1
* @property {string} x
* @property {string=} y
* @property {string} [z]
* @property {string} [w="hi"]
*
* @param {Opts1} opts
*/
function foo1(opts) {
opts.x;
}
foo1({ x: 'abc' });

View file

@ -9,11 +9,39 @@
* *
* @param {Opts} opts * @param {Opts} opts
*/ */
function foo(opts) {} function foo(opts) {
>foo : Symbol(foo, Decl(0.js, 0, 0)) >foo : Symbol(foo, Decl(0.js, 0, 0))
>opts : Symbol(opts, Decl(0.js, 10, 13)) >opts : Symbol(opts, Decl(0.js, 10, 13))
opts.x;
>opts.x : Symbol(x, Decl(0.js, 3, 3))
>opts : Symbol(opts, Decl(0.js, 10, 13))
>x : Symbol(x, Decl(0.js, 3, 3))
}
foo({x: 'abc'}); foo({x: 'abc'});
>foo : Symbol(foo, Decl(0.js, 0, 0)) >foo : Symbol(foo, Decl(0.js, 0, 0))
>x : Symbol(x, Decl(0.js, 12, 5)) >x : Symbol(x, Decl(0.js, 14, 5))
/**
* @typedef {object} Opts1
* @property {string} x
* @property {string=} y
* @property {string} [z]
* @property {string} [w="hi"]
*
* @param {Opts1} opts
*/
function foo1(opts) {
>foo1 : Symbol(foo1, Decl(0.js, 14, 16))
>opts : Symbol(opts, Decl(0.js, 25, 14))
opts.x;
>opts.x : Symbol(x, Decl(0.js, 18, 3))
>opts : Symbol(opts, Decl(0.js, 25, 14))
>x : Symbol(x, Decl(0.js, 18, 3))
}
foo1({x: 'abc'});
>foo1 : Symbol(foo1, Decl(0.js, 14, 16))
>x : Symbol(x, Decl(0.js, 28, 6))

View file

@ -9,10 +9,16 @@
* *
* @param {Opts} opts * @param {Opts} opts
*/ */
function foo(opts) {} function foo(opts) {
>foo : (opts: { x: string; y?: string; z?: string; w?: string; }) => void >foo : (opts: { x: string; y?: string; z?: string; w?: string; }) => void
>opts : { x: string; y?: string; z?: string; w?: string; } >opts : { x: string; y?: string; z?: string; w?: string; }
opts.x;
>opts.x : string
>opts : { x: string; y?: string; z?: string; w?: string; }
>x : string
}
foo({x: 'abc'}); foo({x: 'abc'});
>foo({x: 'abc'}) : void >foo({x: 'abc'}) : void
>foo : (opts: { x: string; y?: string; z?: string; w?: string; }) => void >foo : (opts: { x: string; y?: string; z?: string; w?: string; }) => void
@ -20,3 +26,28 @@ foo({x: 'abc'});
>x : string >x : string
>'abc' : "abc" >'abc' : "abc"
/**
* @typedef {object} Opts1
* @property {string} x
* @property {string=} y
* @property {string} [z]
* @property {string} [w="hi"]
*
* @param {Opts1} opts
*/
function foo1(opts) {
>foo1 : (opts: { x: string; y?: string; z?: string; w?: string; }) => void
>opts : { x: string; y?: string; z?: string; w?: string; }
opts.x;
>opts.x : string
>opts : { x: string; y?: string; z?: string; w?: string; }
>x : string
}
foo1({x: 'abc'});
>foo1({x: 'abc'}) : void
>foo1 : (opts: { x: string; y?: string; z?: string; w?: string; }) => void
>{x: 'abc'} : { x: string; }
>x : string
>'abc' : "abc"

View file

@ -9,9 +9,25 @@
* @property {string=} y * @property {string=} y
* @property {string} [z] * @property {string} [z]
* @property {string} [w="hi"] * @property {string} [w="hi"]
* *
* @param {Opts} opts * @param {Opts} opts
*/ */
function foo(opts) {} function foo(opts) {
opts.x;
}
foo({x: 'abc'}); foo({x: 'abc'});
/**
* @typedef {object} Opts1
* @property {string} x
* @property {string=} y
* @property {string} [z]
* @property {string} [w="hi"]
*
* @param {Opts1} opts
*/
function foo1(opts) {
opts.x;
}
foo1({x: 'abc'});