阅读背景:

在运行时检查字符串文字联合类型的有效性?

来源:互联网 

I have a simple union type of string literals and need to check it's validity because of FFI calls to "normal" Javascript. Is there a way to ensure that a certain variable is an instance of any of those literal strings I have a simple union type of string literals a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: