摘要:
From previous post, Builder pattern - 03 If we do the following changes: - class TypeSafeStringMap<TMap extends Record<string, string> = {}> { + class 阅读全文
摘要:
The builder pattern is a design pattern commonly used in OOP. It is used to create complex objects step by step throught a series of methods, each of 阅读全文
摘要:
file1: import { expect, it } from "vitest"; /** * Here, we've actually got _multiple_ problem files! * Make sure to to check problem.2.ts too. */ decl 阅读全文
摘要:
We have the following code: class Form<TValues> { error?: string; constructor( public values: TValues, private validate: (values: TValues) => string | 阅读全文
摘要:
import { it } from 'vitest'; import { Equal, Expect } from '../helpers/type-utils'; export const isDivElement = (element: unknown): element is HTMLDiv 阅读全文