上一页 1 ··· 74 75 76 77 78 79 80 81 82 ··· 491 下一页
摘要: import { expect, it } from "vitest"; import { Equal, Expect } from "../helpers/type-utils"; export const values = ["a", "b", undefined, "c", undefined 阅读全文
posted @ 2023-02-10 02:10 Zhentiw 阅读(25) 评论(0) 推荐(0)
摘要: import { Equal, Expect } from "../helpers/type-utils"; const obj = { a: 1, b: 2, c: 3, } as const; type ObjKey = keyof typeof obj; //Type '"a"' is not 阅读全文
posted @ 2023-02-08 15:57 Zhentiw 阅读(36) 评论(0) 推荐(0)
摘要: // You'll need to use function overloads to figure this out! function useData<T>(params: { fetchData: () => Promise<T>; initialData?: T }): { getData: 阅读全文
posted @ 2023-02-08 14:18 Zhentiw 阅读(23) 评论(0) 推荐(0)
摘要: Define function / variable in global scope globalThis.myFunc = () => true; // doesn't compile globalThis.myVar = 1; // doesn't compile it("Should let 阅读全文
posted @ 2023-02-06 21:04 Zhentiw 阅读(28) 评论(0) 推荐(0)
摘要: In this exercise, we're going to look at a really interesting property of branded types when they're used with index signatures. Here we have our User 阅读全文
posted @ 2023-02-06 03:38 Zhentiw 阅读(35) 评论(0) 推荐(0)
摘要: https://www.npmjs.com/package/umzug // index.js const { Sequelize } = require('sequelize'); const { Umzug, SequelizeStorage } = require('umzug'); cons 阅读全文
posted @ 2023-02-05 01:35 Zhentiw 阅读(66) 评论(0) 推荐(0)
摘要: We use needleas a client on Node.js express server for fetching the data or site. https://www.npmjs.com/package/needle The leanest and most handsome H 阅读全文
posted @ 2023-02-05 01:32 Zhentiw 阅读(66) 评论(0) 推荐(0)
摘要: Express app: import cors from 'cors'; import express, { Application } from 'express'; import routes from './routes'; import * as middlewares from './m 阅读全文
posted @ 2023-02-05 01:07 Zhentiw 阅读(49) 评论(0) 推荐(0)
摘要: function getTimeNow() { const now = new Date().toLocaleTimeString( 'en-US', { hour12: false } ); return now; } function info(functionName: string, ... 阅读全文
posted @ 2023-02-05 01:03 Zhentiw 阅读(24) 评论(0) 推荐(0)
摘要: name: Development pipeline on: pull_request: branches: - main jobs: Server: runs-on: ubuntu-22.04 steps: - name: Check files uses: actions/checkout@v3 阅读全文
posted @ 2023-02-05 00:42 Zhentiw 阅读(30) 评论(0) 推荐(0)
上一页 1 ··· 74 75 76 77 78 79 80 81 82 ··· 491 下一页