forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeclarationEmitNoInvalidCommentReuse3.js
More file actions
78 lines (65 loc) · 1.72 KB
/
Copy pathdeclarationEmitNoInvalidCommentReuse3.js
File metadata and controls
78 lines (65 loc) · 1.72 KB
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
//// [tests/cases/compiler/declarationEmitNoInvalidCommentReuse3.ts] ////
//// [a.ts]
import { object } from "./obj";
import { id } from "./id";
export const _ = object;
/**
*/
//// [obj.d.ts]
import { id } from "./id";
// ----
export declare const object: id.A<{
foo: id.A<1>
}>;
//// [id.d.ts]
export declare namespace id {
type A<T> = T;
}
//// [a.d.ts]
import { id } from "./id";
export declare const _: {
foo: id.
/**
*/ A /**
*/<1>;
};
/**
*/
//// [DtsFileErrors]
a.d.ts(3,10): error TS2314: Generic type 'A' requires 1 type argument(s).
a.d.ts(6,7): error TS7020: Call signature, which lacks return-type annotation, implicitly has an 'any' return type.
a.d.ts(6,8): error TS1139: Type parameter declaration expected.
a.d.ts(6,10): error TS1109: Expression expected.
a.d.ts(7,1): error TS1128: Declaration or statement expected.
==== a.d.ts (5 errors) ====
import { id } from "./id";
export declare const _: {
foo: id.
~~~
/**
~~~~~~~
*/ A /**
~~~~~~~~
!!! error TS2314: Generic type 'A' requires 1 type argument(s).
*/<1>;
~
!!! error TS7020: Call signature, which lacks return-type annotation, implicitly has an 'any' return type.
~
!!! error TS1139: Type parameter declaration expected.
~
!!! error TS1109: Expression expected.
};
~
!!! error TS1128: Declaration or statement expected.
/**
*/
==== obj.d.ts (0 errors) ====
import { id } from "./id";
// ----
export declare const object: id.A<{
foo: id.A<1>
}>;
==== id.d.ts (0 errors) ====
export declare namespace id {
type A<T> = T;
}