Skip to content

Commit 0266541

Browse files
committed
Implement @inline tag which collapses keyof types into union types
1 parent 70b8c7a commit 0266541

11 files changed

+446
-4793
lines changed

example/index.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,38 @@ namespace Example {
1414
everything = 3,
1515
}
1616

17+
/**
18+
* Different ways an animal might move
19+
*
20+
* @inline
21+
*/
1722
export type MoveType = keyof {
23+
/**
24+
* Crawl like a baby
25+
*/
1826
crawl: string,
27+
/**
28+
* Walk like a man
29+
*/
1930
walk: string,
31+
/**
32+
* Swim like a fish
33+
*
34+
* Or a shark
35+
* or even a whale
36+
*/
2037
swim: string,
38+
/**
39+
* Fly like a bird
40+
*
41+
* @since 2.1
42+
*/
2143
fly: string,
2244
}
2345

46+
/**
47+
* @inline
48+
*/
2449
export type AnimalProperty = keyof Animal;
2550

2651
/**

0 commit comments

Comments
 (0)