上一页 1 ··· 73 74 75 76 77 78 79 80 81 ··· 494 下一页
摘要: import { WatermarkOverlay } from '../watermark-overlay' describe('WatermarkOverlay', () => { let cmp: HTMLElement let fixture: HTMLElement let shadow: 阅读全文
posted @ 2023-03-18 02:56 Zhentiw 阅读(19) 评论(0) 推荐(0)
摘要: <style> @media print { .no-print { display: none !important; } } </style> <div class="overlay--container no-print" >...</div> 阅读全文
posted @ 2023-03-16 22:23 Zhentiw 阅读(17) 评论(0) 推荐(0)
摘要: const rtf = new Intl.RelativeTimeFormat( navigator.language ) const res = rtf.format(-2, 'day') console.log(res) // "2 days ago" 阅读全文
posted @ 2023-03-16 15:31 Zhentiw 阅读(22) 评论(0) 推荐(0)
摘要: const calendarEvent = { title: 'abc submit', date: new Date(123), attendees: ["Steve", {name: 'Steve'}] } const copied = structuredClone(calendarEvent 阅读全文
posted @ 2023-03-16 15:18 Zhentiw 阅读(41) 评论(0) 推荐(0)
摘要: type TMethodListener<T> = (copyFn: T, ...args: any[]) => void; type TBuildInfo<TOverriden> = { mutationList: TOverriden; error?: string; }; /** * @des 阅读全文
posted @ 2023-03-11 22:50 Zhentiw 阅读(29) 评论(0) 推荐(0)
摘要: Say we have code below in the application: const generateRandomColor = () => { let result = ''; for (let index = 0; index < 6; index++) { const [eleme 阅读全文
posted @ 2023-03-06 15:30 Zhentiw 阅读(31) 评论(0) 推荐(0)
摘要: import express, { RequestHandler } from 'express'; import { it } from 'vitest'; import { z, ZodError } from 'zod'; import { Equal, Expect } from '../h 阅读全文
posted @ 2023-03-02 16:42 Zhentiw 阅读(76) 评论(0) 推荐(0)
摘要: import { expect, it } from 'vitest'; import { Equal, Expect } from '../helpers/type-utils'; export function compose<T1, T2>(func: (t1: T1) => T2): (t1 阅读全文
posted @ 2023-03-02 03:23 Zhentiw 阅读(32) 评论(0) 推荐(0)
摘要: const pick = <TObj, TKeys extends (keyof TObj)[]>(obj: TObj, picked: TKeys) => { return picked.reduce((acc, key) => { acc[key] = obj[key]; return acc; 阅读全文
posted @ 2023-03-01 22:30 Zhentiw 阅读(42) 评论(0) 推荐(0)
摘要: Problem for partial inference: export const makeSelectors = < TSource, TSelectors extends Record<string, (source: TSource) => any> = {}, >( selectors: 阅读全文
posted @ 2023-02-27 14:58 Zhentiw 阅读(37) 评论(0) 推荐(0)
上一页 1 ··· 73 74 75 76 77 78 79 80 81 ··· 494 下一页