摘要:
import type only imports declarations to be used for type annotations and declarations. It always gets fully erased, so there’s no remnant of it at ru 阅读全文
posted @ 2022-08-24 14:44
Zhentiw
阅读(100)
评论(0)
推荐(0)
摘要:
function isError(err: any): err is Error { return err instanceof Error; } try { somethingRisky() } catch(err: unknown) { if (isError(err)) { console.l 阅读全文
posted @ 2022-08-24 14:23
Zhentiw
阅读(26)
评论(0)
推荐(0)
摘要:
In some ways // @ts-expect-error can act as a suppression comment, similar to // @ts-ignore. The difference is that // @ts-ignore will do nothing if t 阅读全文
posted @ 2022-08-24 01:46
Zhentiw
阅读(552)
评论(0)
推荐(0)

浙公网安备 33010602011771号