【发布时间】:2022-01-18 00:44:06
【问题描述】:
这种类型有可能吗:
type Input = {
foo: "a" | "b";
bar: "c" | "d";
};
选择这种类型:
type Output =
{ key: "foo"; value: "a" | "b"; } |
{ key: "bar"; value: "c" | "d"; };
?
谢谢!
【问题讨论】:
-
孔多塞学院! ????
标签: typescript types