上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 491 下一页
摘要: import {Expect, Equal} from "../types/utils" import { expect, it } from 'vitest'; type PayloadsToDiscriminatedUnion<T extends Record<string, any>> = { 阅读全文
posted @ 2023-05-07 16:00 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: interface EnemyAttacker { fireWeapon(): void; driveForward(): void; assignDriver(driverName: string): void; } // Target class EnemyTank implements Ene 阅读全文
posted @ 2023-05-05 01:59 Zhentiw 阅读(21) 评论(0) 推荐(0)
摘要: With a long-running node server and a database, sometimes it's useful to ssh into the virtual machine to explore the file system, and look at the data 阅读全文
posted @ 2023-05-04 14:09 Zhentiw 阅读(25) 评论(0) 推荐(0)
摘要: Blog: https://dev.to/marclipovsky/discovering-the-power-of-javascript-proxy-after-all-this-time-4627 Lazy loading: const lazyLoadHandler = { get: func 阅读全文
posted @ 2023-05-04 13:45 Zhentiw 阅读(23) 评论(0) 推荐(0)
摘要: Example code: interface Fruit { name: string; price: number; } export const wrapFruit = <TFruits extends Fruit[]>(fruits: TFruits) => { const getFruit 阅读全文
posted @ 2023-05-03 01:55 Zhentiw 阅读(52) 评论(0) 推荐(0)
摘要: With Temperature = 0, everytimes it generates same response, with high temperature, it add more randomness into the response. prompt = f""" You are a 阅读全文
posted @ 2023-05-02 15:14 Zhentiw 阅读(41) 评论(0) 推荐(0)
摘要: Universal Translator Imagine you are in charge of IT at a large multinational e-commerce company. Users are messaging you with IT issues in all their 阅读全文
posted @ 2023-05-02 14:58 Zhentiw 阅读(22) 评论(0) 推荐(0)
摘要: reverse()mutates the original array, return the reference point to the original array. The toReversed() method of Array instances is the copying count 阅读全文
posted @ 2023-05-02 14:06 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: sort(), mutates the original array, and return the reference to original array and sorted. The toSorted() method of Array instances is the copying ver 阅读全文
posted @ 2023-05-02 14:04 Zhentiw 阅读(41) 评论(0) 推荐(0)
摘要: Array.prototype.splice()mutates the original array. To avoid mutation, we use Array.prototype.slice(). new method Array.prototype.toSpliced() return a 阅读全文
posted @ 2023-05-02 14:01 Zhentiw 阅读(84) 评论(0) 推荐(0)
上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 491 下一页