From 8ae2fbadd0a82a3a77e11a066bc0318e2129e480 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 25 May 2017 22:35:15 -0700 Subject: [PATCH] Add tests and baselines --- tests/baselines/reference/checkJsdocTypedefInParamTag1.js | 4 ++++ .../reference/checkJsdocTypedefInParamTag1.symbols | 6 ++++-- .../reference/checkJsdocTypedefInParamTag1.types | 8 +++++--- .../conformance/jsdoc/checkJsdocTypedefInParamTag1.ts | 2 ++ 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/baselines/reference/checkJsdocTypedefInParamTag1.js b/tests/baselines/reference/checkJsdocTypedefInParamTag1.js index 28d6a96b3f9..d4983bfd581 100644 --- a/tests/baselines/reference/checkJsdocTypedefInParamTag1.js +++ b/tests/baselines/reference/checkJsdocTypedefInParamTag1.js @@ -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 */ diff --git a/tests/baselines/reference/checkJsdocTypedefInParamTag1.symbols b/tests/baselines/reference/checkJsdocTypedefInParamTag1.symbols index 19672d6e52c..cd2455797b4 100644 --- a/tests/baselines/reference/checkJsdocTypedefInParamTag1.symbols +++ b/tests/baselines/reference/checkJsdocTypedefInParamTag1.symbols @@ -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)) diff --git a/tests/baselines/reference/checkJsdocTypedefInParamTag1.types b/tests/baselines/reference/checkJsdocTypedefInParamTag1.types index ff30e8da8a8..cc923e33030 100644 --- a/tests/baselines/reference/checkJsdocTypedefInParamTag1.types +++ b/tests/baselines/reference/checkJsdocTypedefInParamTag1.types @@ -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" diff --git a/tests/cases/conformance/jsdoc/checkJsdocTypedefInParamTag1.ts b/tests/cases/conformance/jsdoc/checkJsdocTypedefInParamTag1.ts index 261ce070cf2..80ca21bd4ff 100644 --- a/tests/cases/conformance/jsdoc/checkJsdocTypedefInParamTag1.ts +++ b/tests/cases/conformance/jsdoc/checkJsdocTypedefInParamTag1.ts @@ -7,6 +7,8 @@ * @typedef {Object} Opts * @property {string} x * @property {string=} y + * @property {string} [z] + * @property {string} [w="hi"] * * @param {Opts} opts */