上一页 1 ··· 119 120 121 122 123 124 125 126 127 ··· 477 下一页
摘要: In VSCode, install REST Clinet Extension: Create API_EXAMPLE.http file in root folder: ### Get mock GET http://localhost:3000/data HTTP/1.1 ### Post m 阅读全文
posted @ 2022-08-22 17:51 Zhentiw 阅读(66) 评论(0) 推荐(0)
摘要: type Corner = `${'top' | 'bottom'} - ${'left' | 'right'}` type Corner = Capitalize<`${'top' | 'bottom'} - ${'left' | 'right'}`> // "Top - left" | "Top 阅读全文
posted @ 2022-08-22 16:01 Zhentiw 阅读(60) 评论(0) 推荐(0)
摘要: V3: type JSONValue = | string | number | boolean | null | JSONArray | JSONObject; type JSONArray = JSONValue[]; type JSONObect = { [k: string]: JSONVa 阅读全文
posted @ 2022-08-22 15:55 Zhentiw 阅读(60) 评论(0) 推荐(0)
摘要: Let's see the unlabelled tuple type: type Address = [ number, string, string, number, ] function printAddress(...address: Address) { console.log(addre 阅读全文
posted @ 2022-08-22 15:03 Zhentiw 阅读(36) 评论(0) 推荐(0)
摘要: List all the props with begin with "query" key in Document type queryTypes = Extract<keyof Document, `query${string}`> type queryyPoprDoc = { [Key in 阅读全文
posted @ 2022-08-21 00:21 Zhentiw 阅读(54) 评论(0) 推荐(0)
摘要: Yarn workspace Add following lines to the package.json file "workspaces": [ "packages/*" ] And create folder call packages in the root folder. Somethi 阅读全文
posted @ 2022-08-19 18:56 Zhentiw 阅读(174) 评论(0) 推荐(0)
摘要: type PartOfWindow = { [Key in | "document" | "navigator" | "setTimeout"]: Window[Key] } /* type PartOfWindow = { document: Document; navigator: Naviga 阅读全文
posted @ 2022-08-18 19:16 Zhentiw 阅读(52) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-18 15:05 Zhentiw 阅读(18) 评论(0) 推荐(0)
摘要: Blog: https://www.geeksforgeeks.org/es6-trampoline-function/ Stackoverflow problem for recursion: const sumBelow = (number, sum = 0) => ( number 0 ? s 阅读全文
posted @ 2022-08-18 14:32 Zhentiw 阅读(80) 评论(0) 推荐(0)
摘要: Index Signature type Fruit = { name: string color: string mass: number } type Dict<T> = { [k: string]: T } // <- index signature const fruitCatalog: D 阅读全文
posted @ 2022-08-17 15:08 Zhentiw 阅读(58) 评论(0) 推荐(0)
上一页 1 ··· 119 120 121 122 123 124 125 126 127 ··· 477 下一页