Skip to content
Discussion options

You must be logged in to vote

这是个类型魔法,正常我们写"aa" | "bb"的话,类型只接受aa bb,其他会报错,但是加上& {},就可以支持已有字符串枚举的同时支持扩展字符串

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@liuweiGL
Comment options

liuweiGL Apr 25, 2021
Collaborator Author

@liuweiGL
Comment options

liuweiGL Apr 25, 2021
Collaborator Author

Answer selected by janryWang
Comment options

liuweiGL
Apr 25, 2021
Collaborator Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants