1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
=== tests/cases/conformance/jsdoc/declarations/index.js ===
export {}; // flag file as module
/**
* @typedef {string | number | symbol} PropName
*/
/**
* Callback
*
* @callback NumberToStringCb
* @param {number} a
* @returns {string}
*/
/**
* @template T
* @typedef {T & {name: string}} MixinName
*/
/**
* Identity function
*
* @template T
* @callback Identity
* @param {T} x
* @returns {T}
*/
=== tests/cases/conformance/jsdoc/declarations/mixed.js ===
/**
* @typedef {{x: string} | number | LocalThing | ExportedThing} SomeType
*/
/**
* @param {number} x
* @returns {SomeType}
*/
function doTheThing(x) {
>doTheThing : Symbol(doTheThing, Decl(mixed.js, 0, 0))
>x : Symbol(x, Decl(mixed.js, 7, 20))
return {x: ""+x};
>x : Symbol(x, Decl(mixed.js, 8, 12))
>x : Symbol(x, Decl(mixed.js, 7, 20))
}
class ExportedThing {
>ExportedThing : Symbol(ExportedThing, Decl(mixed.js, 9, 1))
z = "ok"
>z : Symbol(ExportedThing.z, Decl(mixed.js, 10, 21))
}
module.exports = {
>module.exports : Symbol(module.exports, Decl(mixed.js, 0, 0))
>module : Symbol(module, Decl(mixed.js, 12, 1))
>exports : Symbol(module.exports, Decl(mixed.js, 0, 0))
doTheThing,
>doTheThing : Symbol(doTheThing, Decl(mixed.js, 13, 18))
ExportedThing,
>ExportedThing : Symbol(ExportedThing, Decl(mixed.js, 14, 15))
};
class LocalThing {
>LocalThing : Symbol(LocalThing, Decl(mixed.js, 16, 2))
y = "ok"
>y : Symbol(LocalThing.y, Decl(mixed.js, 17, 18))
}
|