File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ import type { Expect , Equal } from "type-testing" ;
2+ import type { Status , Child , List } from "santas-special-list" ;
3+
4+ declare module "santas-special-list" {
5+ type Status = "naughty" | "nice" ;
6+
7+ interface Child {
8+ name : string ;
9+ status : Status ;
10+ }
11+
12+ type List = Child [ ] ;
13+ }
14+
15+ // ------------------- Test section ---------------------
16+
17+ type t0_actual = Status ; // =>
18+ type t0_expected = "naughty" | "nice" ; // =>
19+ type t0 = Expect < Equal < t0_actual , t0_expected > > ;
20+
21+ type t1_actual = Child ; // =>
22+ interface t1_expected {
23+ // =>
24+ name : string ;
25+ status : Status ;
26+ }
27+ type t1 = Expect < Equal < t1_actual , t1_expected > > ;
28+
29+ type t2_actual = List ; // =>
30+ type t2_expected = Child [ ] ; // =>
31+ type t2 = Expect < Equal < t2_actual , t2_expected > > ;
You can’t perform that action at this time.
0 commit comments