-
|
没看懂 |
Beta Was this translation helpful? Give feedback.
Answered by
janryWang
Apr 25, 2021
Replies: 2 comments 2 replies
-
|
这是个类型魔法,正常我们写"aa" | "bb"的话,类型只接受aa bb,其他会报错,但是加上& {},就可以支持已有字符串枚举的同时支持扩展字符串 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
janryWang
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这是个类型魔法,正常我们写"aa" | "bb"的话,类型只接受aa bb,其他会报错,但是加上& {},就可以支持已有字符串枚举的同时支持扩展字符串