上一页 1 ··· 78 79 80 81 82 83 84 85 86 ··· 494 下一页
摘要: Requirement is if pass in initialData, then return type should not contain undefined, otherwise, it should. import { it } from "vitest"; import { Equa 阅读全文
posted @ 2023-02-02 15:51 Zhentiw 阅读(20) 评论(0) 推荐(0)
摘要: When we pass in "div" to document.querySelector, it returns an HTMLDivElement or null. Similarly, when we pass it "span" we're getting an HTMLSpanElem 阅读全文
posted @ 2023-02-02 15:42 Zhentiw 阅读(34) 评论(0) 推荐(0)
摘要: Here's a function called returnWhatIPassInExceptFor1: function returnWhatIPassInExceptFor1(t: unknown): unknown { if (t 1) { return 2; } return t; } W 阅读全文
posted @ 2023-02-02 01:15 Zhentiw 阅读(41) 评论(0) 推荐(0)
摘要: ### Create a docker file 1. Cd to the project: `cd widget-factory-inc/` 2. create a dockerfile: `vim dockerfile` ```bash FROM httpd:2.4 RUN apt update 阅读全文
posted @ 2023-01-31 19:57 Zhentiw 阅读(115) 评论(0) 推荐(0)
摘要: Union type: function runGenerator(generator: { run: () => string } | (() => string)) { if (typeof generator 'function') { return generator(); } return 阅读全文
posted @ 2023-01-31 19:36 Zhentiw 阅读(33) 评论(0) 推荐(0)
摘要: TypeScript 5.0 now allows JSDoc to declare overloads with a new @overload tag. Each JSDoc comment with an @overload tag is treated as a distinct overl 阅读全文
posted @ 2023-01-30 15:50 Zhentiw 阅读(172) 评论(0) 推荐(0)
摘要: https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#exhaustive-switch-case-completions In the example code: type HasNames = { na 阅读全文
posted @ 2023-01-30 15:47 Zhentiw 阅读(68) 评论(0) 推荐(0)
摘要: Configuration and Installation Obtain the Azure login credentials: az login Copy the code provided by the command. Open a browser and navigate to http 阅读全文
posted @ 2023-01-29 20:28 Zhentiw 阅读(67) 评论(0) 推荐(0)
摘要: The following code import { expect, it } from 'vitest'; import { Equal, Expect } from '../helpers/type-utils'; export interface Cache<T> { get: (key: 阅读全文
posted @ 2023-01-29 20:14 Zhentiw 阅读(27) 评论(0) 推荐(0)
摘要: Storing Container Data in AWS S3 Introduction Using Docker volumes is the preferred method of storing container data locally. Volume support is built 阅读全文
posted @ 2023-01-28 17:37 Zhentiw 阅读(224) 评论(0) 推荐(0)
上一页 1 ··· 78 79 80 81 82 83 84 85 86 ··· 494 下一页