Skip to content

Commit b3633fa

Browse files
author
Gabriela Britto
committed
Add more tests for qualified name param without top level object error
1 parent ebe193c commit b3633fa

6 files changed

+73
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
tests/cases/conformance/jsdoc/paramTagNestedWithoutTopLevelObject4.js(2,20): error TS8032: Qualified name 'xyz.bar.p' is not allowed without a leading '@param {object} xyz.bar'.
2+
3+
4+
==== tests/cases/conformance/jsdoc/paramTagNestedWithoutTopLevelObject4.js (1 errors) ====
5+
/**
6+
* @param {number} xyz.bar.p
7+
~~~~~~~~~
8+
!!! error TS8032: Qualified name 'xyz.bar.p' is not allowed without a leading '@param {object} xyz.bar'.
9+
*/
10+
function g(xyz) {
11+
return xyz.bar.p;
12+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
=== tests/cases/conformance/jsdoc/paramTagNestedWithoutTopLevelObject4.js ===
2+
/**
3+
* @param {number} xyz.bar.p
4+
*/
5+
function g(xyz) {
6+
>g : Symbol(g, Decl(paramTagNestedWithoutTopLevelObject4.js, 0, 0))
7+
>xyz : Symbol(xyz, Decl(paramTagNestedWithoutTopLevelObject4.js, 3, 11))
8+
9+
return xyz.bar.p;
10+
>xyz : Symbol(xyz, Decl(paramTagNestedWithoutTopLevelObject4.js, 3, 11))
11+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
=== tests/cases/conformance/jsdoc/paramTagNestedWithoutTopLevelObject4.js ===
2+
/**
3+
* @param {number} xyz.bar.p
4+
*/
5+
function g(xyz) {
6+
>g : (xyz: any) => any
7+
>xyz : any
8+
9+
return xyz.bar.p;
10+
>xyz.bar.p : any
11+
>xyz.bar : any
12+
>xyz : any
13+
>bar : any
14+
>p : any
15+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// @noEmit: true
2+
// @allowJs: true
3+
// @checkJs: true
4+
// @Filename: paramTagNestedWithoutTopLevelObject2.js
5+
6+
/**
7+
* @param {object} xyz.bar
8+
* @param {number} xyz.bar.p
9+
*/
10+
function g(xyz) {
11+
return xyz.bar.p;
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// @noEmit: true
2+
// @allowJs: true
3+
// @checkJs: true
4+
// @Filename: paramTagNestedWithoutTopLevelObject3.js
5+
6+
/**
7+
* @param {object} xyz
8+
* @param {number} xyz.bar.p
9+
*/
10+
function g(xyz) {
11+
return xyz.bar.p;
12+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// @noEmit: true
2+
// @allowJs: true
3+
// @checkJs: true
4+
// @Filename: paramTagNestedWithoutTopLevelObject4.js
5+
6+
/**
7+
* @param {number} xyz.bar.p
8+
*/
9+
function g(xyz) {
10+
return xyz.bar.p;
11+
}

0 commit comments

Comments
 (0)