mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-12 20:01:02 -05:00
Add more tests for qualified name param without top level object error
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsdoc/paramTagNestedWithoutTopLevelObject4.js (1 errors) ====
|
||||
/**
|
||||
* @param {number} xyz.bar.p
|
||||
~~~~~~~~~
|
||||
!!! error TS8032: Qualified name 'xyz.bar.p' is not allowed without a leading '@param {object} xyz.bar'.
|
||||
*/
|
||||
function g(xyz) {
|
||||
return xyz.bar.p;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
=== tests/cases/conformance/jsdoc/paramTagNestedWithoutTopLevelObject4.js ===
|
||||
/**
|
||||
* @param {number} xyz.bar.p
|
||||
*/
|
||||
function g(xyz) {
|
||||
>g : Symbol(g, Decl(paramTagNestedWithoutTopLevelObject4.js, 0, 0))
|
||||
>xyz : Symbol(xyz, Decl(paramTagNestedWithoutTopLevelObject4.js, 3, 11))
|
||||
|
||||
return xyz.bar.p;
|
||||
>xyz : Symbol(xyz, Decl(paramTagNestedWithoutTopLevelObject4.js, 3, 11))
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
=== tests/cases/conformance/jsdoc/paramTagNestedWithoutTopLevelObject4.js ===
|
||||
/**
|
||||
* @param {number} xyz.bar.p
|
||||
*/
|
||||
function g(xyz) {
|
||||
>g : (xyz: any) => any
|
||||
>xyz : any
|
||||
|
||||
return xyz.bar.p;
|
||||
>xyz.bar.p : any
|
||||
>xyz.bar : any
|
||||
>xyz : any
|
||||
>bar : any
|
||||
>p : any
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// @noEmit: true
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
// @Filename: paramTagNestedWithoutTopLevelObject2.js
|
||||
|
||||
/**
|
||||
* @param {object} xyz.bar
|
||||
* @param {number} xyz.bar.p
|
||||
*/
|
||||
function g(xyz) {
|
||||
return xyz.bar.p;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// @noEmit: true
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
// @Filename: paramTagNestedWithoutTopLevelObject3.js
|
||||
|
||||
/**
|
||||
* @param {object} xyz
|
||||
* @param {number} xyz.bar.p
|
||||
*/
|
||||
function g(xyz) {
|
||||
return xyz.bar.p;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// @noEmit: true
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
// @Filename: paramTagNestedWithoutTopLevelObject4.js
|
||||
|
||||
/**
|
||||
* @param {number} xyz.bar.p
|
||||
*/
|
||||
function g(xyz) {
|
||||
return xyz.bar.p;
|
||||
}
|
||||
Reference in New Issue
Block a user