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
|
//// [tests/cases/conformance/jsdoc/declarations/jsDeclarationsImportTypeBundled.ts] ////
//// [mod1.js]
/**
* @typedef {{x: number}} Item
*/
/**
* @type {Item};
*/
const x = {x: 12};
module.exports = x;
//// [index.js]
/** @type {(typeof import("./folder/mod1"))[]} */
const items = [{x: 12}];
module.exports = items;
//// [out.js]
/**
* @typedef {{x: number}} Item
*/
/**
* @type {Item};
*/
var x = { x: 12 };
module.exports = x;
/** @type {(typeof import("./folder/mod1"))[]} */
var items = [{ x: 12 }];
module.exports = items;
//// [out.d.ts]
declare module "folder/mod1" {
export = x;
/**
* @typedef {{x: number}} Item
*/
/**
* @type {Item};
*/
const x: Item;
namespace x {
export { Item };
}
type Item = {
x: number;
};
}
declare module "index" {
export = items;
/** @type {(typeof import("./folder/mod1"))[]} */
const items: (typeof import("folder/mod1"))[];
}
|