上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 494 下一页
摘要: type BaseTable = { [colName: string]: string | number | boolean; } type Columns<Tables extends { [tableName: string]: BaseTable }> = { [K in keyof Tab 阅读全文
posted @ 2024-08-02 14:50 Zhentiw 阅读(19) 评论(0) 推荐(0)
摘要: class QueryBuilder { private fields: string[] = [] private wheres: Record<string, string> = {} private table: string = "" select(...columns: string[]) 阅读全文
posted @ 2024-08-02 14:19 Zhentiw 阅读(24) 评论(0) 推荐(0)
摘要: import { expect, it, vitest } from 'vitest'; interface User { id: number; name: string; } function printUser(user: User) { Object.keys(user).forEach(( 阅读全文
posted @ 2024-08-01 15:12 Zhentiw 阅读(21) 评论(0) 推荐(0)
摘要: interface User { id: number; name: string; } const users = [ { name: 'Waqas', }, { name: 'Zain', }, ]; const usersWithIds: User[] = users.map((user, i 阅读全文
posted @ 2024-08-01 14:46 Zhentiw 阅读(21) 评论(0) 推荐(0)
摘要: import { flushSync } from 'react-dom' import { createRoot } from 'react-dom/client' let hookIndex = 0 const states: Array<[any, (newState: any) => voi 阅读全文
posted @ 2024-07-31 14:37 Zhentiw 阅读(17) 评论(0) 推荐(0)
摘要: Refer to https://react.dev/reference/react-dom/flushSync For example, the browser onbeforeprint API allows you to change the page immediately before t 阅读全文
posted @ 2024-07-31 14:25 Zhentiw 阅读(45) 评论(0) 推荐(0)
摘要: The error we encountered in this challenge was that the EventTarget | null type was incompatible with the required parameter of type HTMLFormElement. 阅读全文
posted @ 2024-07-29 20:27 Zhentiw 阅读(56) 评论(0) 推荐(0)
摘要: Value Objects are another pattern in Domain-driven Design that provide more structure around what you can and cannot do with a type. In TypeScript we 阅读全文
posted @ 2024-07-29 14:36 Zhentiw 阅读(22) 评论(0) 推荐(0)
摘要: TypeScript will sometimes display the original Primitive Type rather than the Type Alias that you've set. By appending & {} to your Type Alias, you ca 阅读全文
posted @ 2024-07-25 22:26 Zhentiw 阅读(24) 评论(0) 推荐(0)
摘要: vim cheat sheet Keep this handy as you experiment with vim: http://www.fprintf.net/vimCheatSheet.html Here is another guide that covers the commands i 阅读全文
posted @ 2024-07-12 14:42 Zhentiw 阅读(25) 评论(0) 推荐(0)
上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 494 下一页