|
| 1 | +//// [tests/cases/conformance/jsdoc/importTag24.ts] //// |
| 2 | + |
| 3 | +=== types.d.ts === |
| 4 | +export type Foo = string; |
| 5 | +>Foo : Symbol(Foo, Decl(types.d.ts, 0, 0)) |
| 6 | + |
| 7 | +=== a.js === |
| 8 | +/** @import { Foo } from './types.d.ts' */ |
| 9 | + |
| 10 | +function f1() { return undefined; } |
| 11 | +>f1 : Symbol(f1, Decl(a.js, 0, 0)) |
| 12 | +>undefined : Symbol(undefined) |
| 13 | + |
| 14 | +export function f2() { |
| 15 | +>f2 : Symbol(f2, Decl(a.js, 2, 35)) |
| 16 | + |
| 17 | + /** @type {Set<Foo>} */ |
| 18 | + const foo = new Set([ 'a', 'b' ]); |
| 19 | +>foo : Symbol(foo, Decl(a.js, 6, 9)) |
| 20 | +>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.collection.d.ts, --, --)) |
| 21 | + |
| 22 | + return foo; |
| 23 | +>foo : Symbol(foo, Decl(a.js, 6, 9)) |
| 24 | +} |
| 25 | + |
| 26 | +function f3() { return undefined; } |
| 27 | +>f3 : Symbol(f3, Decl(a.js, 8, 1)) |
| 28 | +>undefined : Symbol(undefined) |
| 29 | + |
| 30 | +/** @type {Set<Foo>} */ |
| 31 | +export const foo = new Set([ 'a', 'b' ]); |
| 32 | +>foo : Symbol(foo, Decl(a.js, 13, 12)) |
| 33 | +>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.collection.d.ts, --, --)) |
| 34 | + |
| 35 | +/** |
| 36 | + * @returns {Foo} |
| 37 | + */ |
| 38 | +function f4() { return 1; } |
| 39 | +>f4 : Symbol(f4, Decl(a.js, 13, 41)) |
| 40 | + |
0 commit comments