上一页 1 2 3 4 5 6 7 8 9 10 ··· 464 下一页
摘要: Consider this Result type: type Result<TResult, TError> = | { success: true; data: TResult; } | { success: false; error: TError; }; The Result type ha 阅读全文
posted @ 2024-09-06 15:03 Zhentiw 阅读(8) 评论(0) 推荐(0) 编辑
摘要: Node.js on Containers So now what if we wanted to run a container that has Node.js in it? The default Ubuntu container doesn't have Node.js installed. 阅读全文
posted @ 2024-09-06 14:45 Zhentiw 阅读(5) 评论(0) 推荐(0) 编辑
摘要: So it's much easier to do what we did with Docker. Run this command: docker run --interactive --tty alpine:3.19.1 # or, to be shorter: docker run -it 阅读全文
posted @ 2024-09-06 14:34 Zhentiw 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Consider this package.json file: { "name": "exercise", "version": "1.0.0", "main": "index.js", "scripts": { "dev": "run-p dev:*", "dev:client": "tsc - 阅读全文
posted @ 2024-09-04 14:41 Zhentiw 阅读(7) 评论(0) 推荐(0) 编辑
摘要: A long-awaited feature is smart incremental builds for TypeScript projects. In 3.0 you can use the --build flag with tsc. This is effectively a new en 阅读全文
posted @ 2024-09-03 21:28 Zhentiw 阅读(10) 评论(0) 推荐(0) 编辑
摘要: function timeout(time) { return new Promise((resolve) => { setTimeout(resolve, time); }); } class ParalleTask { constructor(paralleCount = 2) { this.t 阅读全文
posted @ 2024-09-03 21:12 Zhentiw 阅读(4) 评论(0) 推荐(0) 编辑
摘要: @use 'sass:math'; .menu-item { opacity: 0; transition: 0.5s; } $r: 120px; $n: 6; $step: 360deg / $n; for $i from 1 through $n { .board:hover .menu-ite 阅读全文
posted @ 2024-09-03 20:45 Zhentiw 阅读(16) 评论(0) 推荐(0) 编辑
摘要: export const randomColor = () => { return "#" + Math.random().toString(16).substring(2, 8).padEnd(6, '0') } export const randomString = (len: number) 阅读全文
posted @ 2024-09-03 20:35 Zhentiw 阅读(2) 评论(0) 推荐(0) 编辑
摘要: The solution is to modify the tsconfig.json file to enable declarationMap under the compilerOptions. // inside tsconfig.json { "compilerOptions": { "d 阅读全文
posted @ 2024-09-02 20:41 Zhentiw 阅读(4) 评论(0) 推荐(0) 编辑
摘要: <style> dt { position: sticky; top: 0; } </style> <body> <dl> <dt>A</dt> <dd>Adrew W.K</dd> <dd>Adapter</dd> <dt>B</dt> <dd>Border</dd> <dd>Beef</dd> 阅读全文
posted @ 2024-08-29 15:17 Zhentiw 阅读(2) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 464 下一页