Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4f79104

Browse filesBrowse files
author
Yui T
committed
Add tests and baselines
1 parent cabe4d3 commit 4f79104
Copy full SHA for 4f79104

4 files changed

+76Lines changed: 76 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//// [0.js]
2+
// @ts-check
3+
/**
4+
* @typedef {Object} Opts
5+
* @property {string} x
6+
* @property {string=} y
7+
*
8+
* @param {Opts} opts
9+
*/
10+
function foo(opts) {}
11+
12+
foo({x: 'abc'});
13+
14+
//// [0.js]
15+
// @ts-check
16+
/**
17+
* @typedef {Object} Opts
18+
* @property {string} x
19+
* @property {string=} y
20+
*
21+
* @param {Opts} opts
22+
*/
23+
function foo(opts) { }
24+
foo({ x: 'abc' });
Collapse file
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
=== tests/cases/conformance/jsdoc/0.js ===
2+
// @ts-check
3+
/**
4+
* @typedef {Object} Opts
5+
* @property {string} x
6+
* @property {string=} y
7+
*
8+
* @param {Opts} opts
9+
*/
10+
function foo(opts) {}
11+
>foo : Symbol(foo, Decl(0.js, 0, 0))
12+
>opts : Symbol(opts, Decl(0.js, 8, 13))
13+
14+
foo({x: 'abc'});
15+
>foo : Symbol(foo, Decl(0.js, 0, 0))
16+
>x : Symbol(x, Decl(0.js, 10, 5))
17+
Collapse file
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
=== tests/cases/conformance/jsdoc/0.js ===
2+
// @ts-check
3+
/**
4+
* @typedef {Object} Opts
5+
* @property {string} x
6+
* @property {string=} y
7+
*
8+
* @param {Opts} opts
9+
*/
10+
function foo(opts) {}
11+
>foo : (opts: { x: string; y?: string; }) => void
12+
>opts : { x: string; y?: string; }
13+
14+
foo({x: 'abc'});
15+
>foo({x: 'abc'}) : void
16+
>foo : (opts: { x: string; y?: string; }) => void
17+
>{x: 'abc'} : { x: string; }
18+
>x : string
19+
>'abc' : "abc"
20+
Collapse file
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// @allowJS: true
2+
// @suppressOutputPathCheck: true
3+
4+
// @filename: 0.js
5+
// @ts-check
6+
/**
7+
* @typedef {Object} Opts
8+
* @property {string} x
9+
* @property {string=} y
10+
*
11+
* @param {Opts} opts
12+
*/
13+
function foo(opts) {}
14+
15+
foo({x: 'abc'});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.