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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
=== tests/cases/conformance/jsdoc/declarations/index.js ===
export function a() {}
>a : () => void
export function b() {}
>b : typeof b
b.cat = "cat";
>b.cat = "cat" : "cat"
>b.cat : string
>b : typeof b
>cat : string
>"cat" : "cat"
export function c() {}
>c : typeof c
c.Cls = class {}
>c.Cls = class {} : typeof Cls
>c.Cls : typeof Cls
>c : typeof c
>Cls : typeof Cls
>class {} : typeof Cls
/**
* @param {number} a
* @param {number} b
* @return {string}
*/
export function d(a, b) { return /** @type {*} */(null); }
>d : (a: number, b: number) => string
>a : number
>b : number
>(null) : any
>null : null
/**
* @template T,U
* @param {T} a
* @param {U} b
* @return {T & U}
*/
export function e(a, b) { return /** @type {*} */(null); }
>e : <T, U>(a: T, b: U) => T & U
>a : T
>b : U
>(null) : any
>null : null
/**
* @template T
* @param {T} a
*/
export function f(a) {
>f : typeof f
>a : T
return a;
>a : T
}
f.self = f;
>f.self = f : typeof f
>f.self : typeof f
>f : typeof f
>self : typeof f
>f : typeof f
/**
* @param {{x: string}} a
* @param {{y: typeof b}} b
*/
function g(a, b) {
>g : (a: { x: string;}, b: { y: typeof import("tests/cases/conformance/jsdoc/declarations/index").b; }) => void
>a : { x: string; }
>b : { y: typeof import("tests/cases/conformance/jsdoc/declarations/index").b; }
return a.x && b.y();
>a.x && b.y() : void
>a.x : string
>a : { x: string; }
>x : string
>b.y() : void
>b.y : typeof import("tests/cases/conformance/jsdoc/declarations/index").b
>b : { y: typeof import("tests/cases/conformance/jsdoc/declarations/index").b; }
>y : typeof import("tests/cases/conformance/jsdoc/declarations/index").b
}
export { g };
>g : (a: { x: string; }, b: { y: typeof b; }) => void
/**
* @param {{x: string}} a
* @param {{y: typeof b}} b
*/
function hh(a, b) {
>hh : (a: { x: string;}, b: { y: typeof import("tests/cases/conformance/jsdoc/declarations/index").b; }) => void
>a : { x: string; }
>b : { y: typeof import("tests/cases/conformance/jsdoc/declarations/index").b; }
return a.x && b.y();
>a.x && b.y() : void
>a.x : string
>a : { x: string; }
>x : string
>b.y() : void
>b.y : typeof import("tests/cases/conformance/jsdoc/declarations/index").b
>b : { y: typeof import("tests/cases/conformance/jsdoc/declarations/index").b; }
>y : typeof import("tests/cases/conformance/jsdoc/declarations/index").b
}
export { hh as h };
>hh : (a: { x: string; }, b: { y: typeof b; }) => void
>h : (a: { x: string; }, b: { y: typeof b; }) => void
export function i() {}
>i : () => void
export { i as ii };
>i : () => void
>ii : () => void
export { j as jj };
>j : () => void
>jj : () => void
export function j() {}
>j : () => void
|