摘要: 1. Globally import In vitest, you need to do import { it, expect, test } from 'vitest'; In every test files, If you don't want to do it you can set co 阅读全文
posted @ 2023-09-20 01:33 Zhentiw 阅读(42) 评论(0) 推荐(0) 编辑
摘要: type WidenLiteral<T> = T extends string | number | boolean ? ReturnType<T["valueOf"]> : T; type Example1 = WidenLiteral<"abc"> // string type Example2 阅读全文
posted @ 2023-09-20 01:29 Zhentiw 阅读(4) 评论(0) 推荐(0) 编辑