Add tests and baselines

This commit is contained in:
Yui T 2017-05-25 22:35:15 -07:00
parent d68038ad28
commit 8ae2fbadd0
4 changed files with 15 additions and 5 deletions

View File

@ -4,6 +4,8 @@
* @typedef {Object} Opts
* @property {string} x
* @property {string=} y
* @property {string} [z]
* @property {string} [w="hi"]
*
* @param {Opts} opts
*/
@ -17,6 +19,8 @@ foo({x: 'abc'});
* @typedef {Object} Opts
* @property {string} x
* @property {string=} y
* @property {string} [z]
* @property {string} [w="hi"]
*
* @param {Opts} opts
*/

View File

@ -4,14 +4,16 @@
* @typedef {Object} Opts
* @property {string} x
* @property {string=} y
* @property {string} [z]
* @property {string} [w="hi"]
*
* @param {Opts} opts
*/
function foo(opts) {}
>foo : Symbol(foo, Decl(0.js, 0, 0))
>opts : Symbol(opts, Decl(0.js, 8, 13))
>opts : Symbol(opts, Decl(0.js, 10, 13))
foo({x: 'abc'});
>foo : Symbol(foo, Decl(0.js, 0, 0))
>x : Symbol(x, Decl(0.js, 10, 5))
>x : Symbol(x, Decl(0.js, 12, 5))

View File

@ -4,16 +4,18 @@
* @typedef {Object} Opts
* @property {string} x
* @property {string=} y
* @property {string} [z]
* @property {string} [w="hi"]
*
* @param {Opts} opts
*/
function foo(opts) {}
>foo : (opts: { x: string; y?: string; }) => void
>opts : { x: string; y?: string; }
>foo : (opts: { x: string; y?: string; z?: string; w?: string; }) => void
>opts : { x: string; y?: string; z?: string; w?: string; }
foo({x: 'abc'});
>foo({x: 'abc'}) : void
>foo : (opts: { x: string; y?: string; }) => void
>foo : (opts: { x: string; y?: string; z?: string; w?: string; }) => void
>{x: 'abc'} : { x: string; }
>x : string
>'abc' : "abc"

View File

@ -7,6 +7,8 @@
* @typedef {Object} Opts
* @property {string} x
* @property {string=} y
* @property {string} [z]
* @property {string} [w="hi"]
*
* @param {Opts} opts
*/