上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 494 下一页
摘要: An LRU (Least Recently Used) cache is a type of data structure that maintains a limited size of items and evicts the least recently accessed item when 阅读全文
posted @ 2023-08-25 02:26 Zhentiw 阅读(51) 评论(0) 推荐(0)
摘要: I want to add a common attribute to dom element globally: <> <div testId="123" /> <audio testId="123" /> <video testId="123" /> <a testId="123" /> <ab 阅读全文
posted @ 2023-08-24 14:52 Zhentiw 阅读(21) 评论(0) 推荐(0)
摘要: The ElementTypetype helper is a bit unusal because it accepts some props and derives what types of components would be able to recieve those props. He 阅读全文
posted @ 2023-08-23 14:05 Zhentiw 阅读(232) 评论(0) 推荐(0)
摘要: interface IntrinsicElements { // HTML a: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>; abbr: React.Detail 阅读全文
posted @ 2023-08-23 13:53 Zhentiw 阅读(196) 评论(1) 推荐(0)
摘要: This is ReactNode: type ReactNode = | ReactElement | string | number | ReactFragment | ReactPortal | boolean | null | undefined This is React.ReactEle 阅读全文
posted @ 2023-08-22 15:37 Zhentiw 阅读(35) 评论(0) 推荐(0)
摘要: 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 阅读(61) 评论(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 阅读(112) 评论(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 阅读(17) 评论(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 阅读(32) 评论(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 阅读(17) 评论(0) 推荐(0)
上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 494 下一页