{"pageContext":{"index":128,"total":362,"name":"2021-10-17","items":[{"node":{"frontmatter":{"title":"3 个 TypeScript 技巧","publish":true,"cover":"","showCover":true,"date":"2021-10-17","category":"javascript","url":"https://www.cstrnt.dev/blog/three-typescript-tricks","author":"Tim Raderschad","translator":"","tags":["typescript"],"priority":1},"html":"<h2 id=\"readonlyt\"><a href=\"#readonlyt\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Readonly<T></h2>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">function</span> <span class=\"token function\">sortNumbers</span><span class=\"token punctuation\">(</span>array<span class=\"token punctuation\">:</span> Readonly<span class=\"token operator\">&lt;</span>Array<span class=\"token operator\">&lt;</span>number<span class=\"token operator\">>></span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n <span class=\"token keyword\">return</span> <span class=\"token punctuation\">[</span><span class=\"token operator\">...</span>array<span class=\"token punctuation\">]</span><span class=\"token punctuation\">.</span><span class=\"token function\">sort</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">(</span>a<span class=\"token punctuation\">,</span> b<span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span> a <span class=\"token operator\">-</span> b<span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n<h2 id=\"使用unknown而不是any\"><a href=\"#%E4%BD%BF%E7%94%A8unknown%E8%80%8C%E4%B8%8D%E6%98%AFany\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>使用Unknown而不是Any</h2>\n<h2 id=\"使用recordkeyvalue\"><a href=\"#%E4%BD%BF%E7%94%A8recordkeyvalue\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>使用Record&#x3C;Key,Value></h2>"}},{"node":{"frontmatter":{"title":"Deno 现状一览","publish":true,"cover":"https://miro.medium.com/max/1400/1*S-b-N2ejMV7HcFFwROMH0A.jpeg","showCover":true,"date":"2021-10-17","category":"nodejs","url":"https://blog.bitsrc.io/is-deno-still-a-thing-a-look-at-the-status-of-the-node-killer-884d47981d09","author":"Fernando Doglio","translator":"","tags":["deno"],"priority":1},"html":"<blockquote>\n<p>Deno仍在继续...</p>\n</blockquote>"}},{"node":{"frontmatter":{"title":"React-Intl-Tel-Input — 验证国际电话号码","publish":true,"cover":"","showCover":true,"date":"2021-10-17","category":"fronte","url":"https://github.com/patw0929/react-intl-tel-input","author":"Patrick Wang","translator":"","tags":["react"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"Caroumesh - 3D轮播组件","publish":true,"cover":"https://camo.githubusercontent.com/384b000c5d284c94bd6f0265eb485f93f800fdb3b3cc099552c03719b469f117/68747470733a2f2f692e696d6775722e636f6d2f6565413554556c2e676966","showCover":true,"date":"2021-10-17","category":"frontend","url":"https://github.com/Adonis-Stavridis/caroumesh","author":"Adonis Stavridis","translator":"","tags":["react"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"Redux Toolkit介绍","publish":true,"cover":"https://blog.openreplay.com/static/860c432725aeefb9c5b68be40a6acf69/d3b1c/img2.png","showCover":true,"date":"2021-10-17","category":"frontend","url":"https://blog.openreplay.com/redux-is-dead-long-live-redux-toolkit","author":"Victoria Lo","translator":"","tags":["redux"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"Sapling - 遍历React组件层次结构的VSCode扩展","publish":true,"cover":"https://github.com/oslabs-beta/sapling/raw/master/sapling/media/quizwall_demo.gif","showCover":true,"date":"2021-10-17","category":"other","url":"https://github.com/oslabs-beta/sapling","author":"OSLabs Beta","translator":"","tags":["vscode"],"priority":1},"html":"<blockquote>\n<p>文件选择不太方便</p>\n</blockquote>"}},{"node":{"frontmatter":{"title":"dnd-kit - 轻量级react拖拽工具包","publish":true,"cover":"https://github.com/clauderic/dnd-kit/raw/master/.github/assets/concepts-illustration.svg","showCover":true,"date":"2021-10-17","category":"frontend","url":"https://github.com/clauderic/dnd-kit","author":"Claudéric Demers","translator":"","tags":["react"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"react-native-panorama-view - react native全景图像查看器","publish":true,"cover":"https://raw.githubusercontent.com/lightbasenl/react-native-panorama-view/master/demo.gif","showCover":true,"date":"2021-10-17","category":"mobile","url":"https://github.com/lightbasenl/react-native-panorama-view","author":"Lightbase","translator":"","tags":["react native"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"nice-modal-react - ebay出品无依赖模式对话框","publish":true,"cover":"https://github.com/eBay/nice-modal-react/raw/main/images/modal-example.png","showCover":true,"date":"2021-10-17","category":"frontend","url":"https://github.com/eBay/nice-modal-react","author":"eBay","translator":"","tags":["react"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"使用GitHub Actions和OIDC无需凭据即可部署","publish":true,"cover":"https://blog.alexellis.io/content/images/2021/10/first-try.jpeg","showCover":true,"date":"2021-10-17","category":"devops","url":"https://blog.alexellis.io/deploy-without-credentials-using-oidc-and-github-actions/","author":"JAlex Ellis","translator":"","tags":["OIDC"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"reactfire - firebase与react交互工具","publish":true,"cover":"","showCover":true,"date":"2021-10-17","category":"frontend","url":"https://github.com/FirebaseExtended/reactfire","author":"FirebaseExtended","translator":"","tags":["firebase"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"使用 CSS 和 JS 构建的动画背景图库","publish":true,"cover":"","showCover":true,"date":"2021-10-17","category":"frontend","url":"https://animatedbackgrounds.me/","author":"animatedbackgrounds","translator":"","tags":["css"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"世界气候地图","publish":true,"cover":"","showCover":true,"date":"2021-10-17","category":"other","url":"https://weatherspark.com/map","author":"weatherspark.com","translator":"","tags":["weather"],"priority":1},"html":"<blockquote>\n<p>摩洛哥是最舒服的？</p>\n</blockquote>"}},{"node":{"frontmatter":{"title":"在线笔触绘制动画导出gif","publish":true,"cover":"","showCover":true,"date":"2021-10-17","category":"other","url":"https://sketchmachine.net/","author":"sketchmachine.net","translator":"","tags":["gif"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"如何检测React中的慢速渲染","publish":true,"cover":"https://alexsidorenko.com/5e1a9fc00753c135f4eb16e7a9dfcce7/commits.gif","showCover":true,"date":"2021-10-17","category":"frontend","url":"https://alexsidorenko.com/blog/react-performance-slow-renders/","author":"Alex Sidorenko","translator":"","tags":["react"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"太阳能飞机飞行近三周未着陆","publish":true,"cover":"https://eandt.theiet.org/media/16923/zephyr-2021-test-flight-campaign-take-off.jpg?anchor=center&mode=crop&width=1200&rnd=132784323860000000","showCover":true,"date":"2021-10-17","category":"tech","url":"https://eandt.theiet.org/content/articles/2021/10/solar-powered-aircraft-flown-for-nearly-three-weeks-without-landing/","author":"Jack Loughran","translator":"","tags":["react"],"priority":2},"html":"<p>空中客车公司已经完成了其太阳能 Zephyr 飞机的试飞，该飞机旨在一次在空中停留数周，以便为地面用户提供互联网服务。</p>"}},{"node":{"frontmatter":{"title":"使用GitHub Actions和OIDC无需凭据即可部署","publish":true,"cover":"","showCover":true,"date":"2021-10-17","category":"career","url":"https://www.simplethread.com/20-things-ive-learned-in-my-20-years-as-a-software-engineer","author":"Justin Etheredge","translator":"","tags":["engineer"],"priority":1},"html":"<ul>\n<li>\n<p>最好的代码是没有代码，或者不需要维护的代码</p>\n</li>\n<li>\n<p>您的数据是您系统中最重要的部分</p>\n</li>\n<li>\n<p>不要把谦虚误认为无知</p>\n</li>\n<li>\n<p>如今，每个人都想变得敏捷，但“敏捷”是关于构建小块的东西，学习，然后迭代。如果有人试图将更多的精力投入其中，那么他们可能是在卖东西。</p>\n</li>\n<li>\n<p>面试对于说明一个团队成员的优秀程度几乎毫无价值</p>\n</li>\n</ul>"}},{"node":{"frontmatter":{"title":"每个 JavaScript 工程师都应懂的33个概念","publish":true,"cover":"https://github.com/stephentian/33-js-concepts/raw/master/33_js_concepts.jpg","showCover":true,"date":"2021-10-17","category":"javascript","url":"https://www.cstrnt.dev/blog/three-typescript-tricks","author":"Re Tian","translator":"","tags":["javascript"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"教程 - css简单实现打字机效果","publish":true,"cover":"https://uploads.sitepoint.com/wp-content/uploads/2021/10/1633668053saas.gif","showCover":true,"date":"2021-10-17","category":"frontend","url":"https://www.sitepoint.com/css-typewriter-effect/","author":"Matt Nikonorov","translator":"","tags":["css"],"priority":1},"html":""}},{"node":{"frontmatter":{"title":"游戏Halo(光晕)的后端分布式方案","publish":true,"cover":"https://cleverheap.com/about-halo-backend/statistics_service.jpg","showCover":true,"date":"2021-10-17","category":"devops","url":"https://cleverheap.com/posts/about-halo-backend/","author":"Vladimir Marinkovic","translator":"","tags":["distributed"],"priority":1},"html":""}}]}}