上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 466 下一页
摘要: The gap property in CSS is a shorthand for row-gap and column-gap, specifying the size of gutters, which is the space between rows and columns within  阅读全文
posted @ 2023-02-18 17:16 Zhentiw 阅读(47) 评论(0) 推荐(0) 编辑
摘要: Run: pnpm create vite Give a project name, select framework & Typescript. Run: pnpm devto start the dev server 阅读全文
posted @ 2023-02-18 17:05 Zhentiw 阅读(16) 评论(0) 推荐(0) 编辑
摘要: import { it } from 'vitest'; interface Events { click: { x: number; y: number; }; focus: undefined; } type LookUpEvents<K extends keyof Events> = Even 阅读全文
posted @ 2023-02-18 16:15 Zhentiw 阅读(14) 评论(0) 推荐(0) 编辑
摘要: import { expect, it } from "vitest"; import { fetchUser } from "fake-external-lib"; type Middleware<TInput, TOutput> = (input: TInput) => TOutput; cla 阅读全文
posted @ 2023-02-15 16:48 Zhentiw 阅读(22) 评论(0) 推荐(0) 编辑
摘要: From previous post, Builder pattern - 03 If we do the following changes: - class TypeSafeStringMap<TMap extends Record<string, string> = {}> { + class 阅读全文
posted @ 2023-02-14 15:07 Zhentiw 阅读(18) 评论(0) 推荐(0) 编辑
摘要: import { expect, it } from 'vitest'; class TypeSafeStringMap<TMap extends Record<string, string> = {}> { private map: TMap; constructor() { this.map = 阅读全文
posted @ 2023-02-14 14:24 Zhentiw 阅读(11) 评论(0) 推荐(0) 编辑
摘要: export class BuilderTuple<TList extends any[] = []> { list: TList; constructor() { this.list = [] as any; } push<TNum extends number>(num: TNum): Buil 阅读全文
posted @ 2023-02-13 18:12 Zhentiw 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2023-02-13 16:41 Zhentiw 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 466 下一页