Skip to content

Commit 3f52b8d

Browse files
committed
add day 9
1 parent dac4858 commit 3f52b8d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

2024/09/index.d.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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>>;

0 commit comments

Comments
 (0)