12 2023 档案

摘要:Sometimes we have a free-standing function that has a strong opinion around what this will end up being, at the time it is invoked. For example, if we 阅读全文
posted @ 2023-12-30 22:10 Zhentiw 阅读(13) 评论(0) 推荐(0) 编辑
摘要:interface UnionBuilder<T = never> { add: <NewValue>() => UnionBuilder<T | NewValue>, fold: () => T } declare const u: UnionBuilder; const result = u . 阅读全文
posted @ 2023-12-27 22:21 Zhentiw 阅读(13) 评论(0) 推荐(0) 编辑
摘要:type NestedNumber = number | NestedNumber[] 阅读全文
posted @ 2023-12-19 21:33 Zhentiw 阅读(9) 评论(0) 推荐(0) 编辑
摘要:https://github.com/sharkdp/hyperfine hyperfine --runs 5 "CMD_1" "CMD_2" So it will run 5 times and compare CMD_1 vs CMD_2with a nice result summary 阅读全文
posted @ 2023-12-13 02:47 Zhentiw 阅读(4) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash # url will be a param been passed in url=$1 curl -X POST http://localhost:3000/endpoint -d "{\"payload\":\"$url\"}" -H "content-type: appl 阅读全文
posted @ 2023-12-13 02:27 Zhentiw 阅读(4) 评论(0) 推荐(0) 编辑
摘要:const returnWhatIPassIn = <const T extends any[]>(t: T) => { return t; }; // result is any[] in TS 5.2, but ['a', 'b', 'c'] in 5.3 const result = retu 阅读全文
posted @ 2023-12-13 01:55 Zhentiw 阅读(6) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示