摘要:
Consider this discriminated union called Fruit: type Fruit = | { name: "apple"; color: "red"; } | { name: "banana"; color: "yellow"; } | { name: "oran 阅读全文
posted @ 2022-12-13 15:42
Zhentiw
阅读(36)
评论(0)
推荐(0)
摘要:
We start with a Values interface: interface Values { email: string; firstName: string; lastName: string; } We want a union of tuple [key, value]as res 阅读全文
posted @ 2022-12-13 15:31
Zhentiw
阅读(32)
评论(0)
推荐(0)
摘要:
We have a type Route that is a discriminated union of the possible routes in the application. Each route has the properties search and route type Rout 阅读全文
posted @ 2022-12-13 15:26
Zhentiw
阅读(31)
评论(0)
推荐(0)

浙公网安备 33010602011771号