上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 494 下一页
摘要: We start with three interface types: User, Organisation, and Product. These types share common properties: id, name, and imageId, but each also posses 阅读全文
posted @ 2024-07-11 14:50 Zhentiw 阅读(21) 评论(0) 推荐(0)
摘要: One common question is whether to use type or interface in TypeScript. To clarify the difference, type can represent anything, including objects, wher 阅读全文
posted @ 2024-07-11 14:30 Zhentiw 阅读(23) 评论(0) 推荐(0)
摘要: You don't really need to apply a really complex regex for one validation, instead you can combine multi regex together to fulfilll the task. const reg 阅读全文
posted @ 2024-07-08 14:57 Zhentiw 阅读(15) 评论(0) 推荐(0)
摘要: You cannot assign anything to never, except for never itself. // red squiggly lines under everything in parens fn("hello"); fn(42); fn(true); fn({}); 阅读全文
posted @ 2024-07-08 14:36 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_46.md#add-all-missing-imports-source-action 阅读全文
posted @ 2024-07-06 17:08 Zhentiw 阅读(18) 评论(0) 推荐(0)
摘要: declare const tag: unique symbol; export type EmptyObject = { [tag]?: never }; // Record<PropertyKey, never> const acceptOnlyEmptyObject = (input: Emp 阅读全文
posted @ 2024-07-04 02:23 Zhentiw 阅读(27) 评论(0) 推荐(0)
摘要: const acceptAnythingExceptNullOrUndefined = <T>(input: {}) => {}; acceptAnythingExceptNullOrUndefined('hello'); acceptAnythingExceptNullOrUndefined(42 阅读全文
posted @ 2024-07-04 02:14 Zhentiw 阅读(17) 评论(0) 推荐(0)
摘要: Any time when you have non-primitive type, it's going to be removed from memory anytime if it is no longer needed. class Test { constructor(name) { th 阅读全文
posted @ 2024-07-01 19:49 Zhentiw 阅读(19) 评论(0) 推荐(0)
摘要: Video: https://www.youtube.com/watch?v=PkFuytYVqI8&list=WL&index=67 body └─ article.feature ├─ section.article-hero │ ├─ h2 │ └─ img │ ├─ section.arti 阅读全文
posted @ 2024-07-01 19:10 Zhentiw 阅读(22) 评论(0) 推荐(0)
摘要: Video: https://www.youtube.com/watch?v=zqjKE_zcWzE&list=WL&index=68&t=14s code: https://github.com/Alliemack77/scroll-animations-with-css-only /* Cust 阅读全文
posted @ 2024-07-01 19:04 Zhentiw 阅读(27) 评论(0) 推荐(0)
上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 494 下一页