上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 491 下一页
摘要: Run playwright A basic playwright code example: import {test, expect} from "@playwright/test" test("Math works", () => { expect(1+2).toBe(2); }); // O 阅读全文
posted @ 2023-08-22 14:47 Zhentiw 阅读(58) 评论(0) 推荐(0)
摘要: export = React; export as namespace React; declare namespace React { // // React Elements // type ElementType<P = any> = { [K in keyof JSX.IntrinsicEl 阅读全文
posted @ 2023-08-21 15:03 Zhentiw 阅读(102) 评论(0) 推荐(0)
摘要: import { DependencyList, useMemo, useState } from "react"; import { Equal, Expect } from "../helpers/type-utils"; const useCustomState = <TValue>(init 阅读全文
posted @ 2023-08-21 14:45 Zhentiw 阅读(12) 评论(0) 推荐(0)
摘要: import { useState } from "react"; import { Equal, Expect } from "../helpers/type-utils"; type UseStateReturnValue<T> = { value: T; set: React.Dispatch 阅读全文
posted @ 2023-08-21 14:39 Zhentiw 阅读(28) 评论(0) 推荐(0)
摘要: import { useEffect, useState } from "react"; export type Result<T> = | ["loading", undefined?] | ["error", Error] | ["success", T]; export const useDa 阅读全文
posted @ 2023-08-17 15:14 Zhentiw 阅读(13) 评论(0) 推荐(0)
摘要: import React from "react"; import { Equal, Expect } from "../helpers/type-utils"; const createRequiredContext = <T extends any>() => { const context = 阅读全文
posted @ 2023-08-16 20:20 Zhentiw 阅读(17) 评论(0) 推荐(0)
摘要: // Problem import { useState } from "react"; import { Equal, Expect } from "../helpers/type-utils"; export const useId = (defaultId: string) => { cons 阅读全文
posted @ 2023-08-16 19:48 Zhentiw 阅读(18) 评论(0) 推荐(0)
摘要: In package management systems like npm (for JavaScript/Node.js projects), dependencies are typically fetched from a remote registry. However, there ar 阅读全文
posted @ 2023-08-16 15:40 Zhentiw 阅读(15) 评论(0) 推荐(0)
摘要: Typescript has its problem that when you try to compare generic function to a function signature, you will run into issue. Because for one function, i 阅读全文
posted @ 2023-08-16 02:48 Zhentiw 阅读(15) 评论(0) 推荐(0)
摘要: import { Equal, Expect } from "../helpers/type-utils"; interface Button<T> { value: T; label: string; } interface ButtonGroupProps<T> { buttons: Butto 阅读全文
posted @ 2023-08-12 16:49 Zhentiw 阅读(18) 评论(0) 推荐(0)
上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 491 下一页