摘要: file1: import { expect, it } from "vitest"; /** * Here, we've actually got _multiple_ problem files! * Make sure to to check problem.2.ts too. */ decl 阅读全文
posted @ 2023-02-10 21:09 Zhentiw 阅读(15) 评论(0) 推荐(0) 编辑
摘要: We have the following code: class Form<TValues> { error?: string; constructor( public values: TValues, private validate: (values: TValues) => string | 阅读全文
posted @ 2023-02-10 21:03 Zhentiw 阅读(12) 评论(0) 推荐(0) 编辑
摘要: import { it } from 'vitest'; import { Brand } from '../helpers/Brand'; type Valid<T> = Brand<T, 'Valid'>; interface PasswordValues { password: string; 阅读全文
posted @ 2023-02-10 20:44 Zhentiw 阅读(12) 评论(0) 推荐(0) 编辑
摘要: import { it } from 'vitest'; import { Equal, Expect } from '../helpers/type-utils'; export const isDivElement = (element: unknown): element is HTMLDiv 阅读全文
posted @ 2023-02-10 20:38 Zhentiw 阅读(10) 评论(0) 推荐(0) 编辑
摘要: import { expect, it } from "vitest"; import { Equal, Expect } from "../helpers/type-utils"; export const values = ["a", "b", undefined, "c", undefined 阅读全文
posted @ 2023-02-10 02:10 Zhentiw 阅读(19) 评论(0) 推荐(0) 编辑