上一页 1 ··· 89 90 91 92 93 94 95 96 97 ··· 495 下一页
摘要: Implement the generic ClassPublicKeys<T> which returns all public keys of a class. For example: class A { public str: string protected num: number pri 阅读全文
posted @ 2022-11-26 16:14 Zhentiw 阅读(17) 评论(0) 推荐(0)
摘要: The well known split() method splits a string into an array of substrings by looking for a separator, and returns the new array. The goal of this chal 阅读全文
posted @ 2022-11-25 15:15 Zhentiw 阅读(38) 评论(0) 推荐(0)
摘要: Drop the specified chars from a string. For example: type Butterfly = DropString<'foobar!', 'fb'> // 'ooar!' /* _____________ Your Code Here _________ 阅读全文
posted @ 2022-11-25 01:15 Zhentiw 阅读(32) 评论(0) 推荐(0)
摘要: Implement Camelize which converts object from snake_case to to camelCase Camelize<{ some_prop: string, prop: { another_prop: string }, array: [{ snake 阅读全文
posted @ 2022-11-24 15:16 Zhentiw 阅读(27) 评论(0) 推荐(0)
摘要: import { assign, createMachine } from "xstate"; type FetchStates = | { value: "idle"; context: FetchContext & { results: []; message: ""; }; } | { val 阅读全文
posted @ 2022-11-23 16:39 Zhentiw 阅读(63) 评论(0) 推荐(0)
摘要: import "./styles.css"; import React from "react"; import ReactDOM from "react-dom"; import { createMachine, assign } from "xstate"; import { useMachin 阅读全文
posted @ 2022-11-23 03:24 Zhentiw 阅读(77) 评论(0) 推荐(0)
摘要: Create a type-level function whose types is similar to Pinia library. You don't need to implement function actually, just adding types. Overview This 阅读全文
posted @ 2022-11-22 16:02 Zhentiw 阅读(44) 评论(0) 推荐(0)
摘要: import React, { useState } from "react"; type Base = { id: string } | string; type GenericSelectProps<TValue> = { formatLabel: (value: TValue) => stri 阅读全文
posted @ 2022-11-21 15:48 Zhentiw 阅读(39) 评论(0) 推荐(0)
摘要: Implement a type DeepPick, that extends Utility types Pick. A type takes two arguments. For example: type obj = { name: 'hoge', age: 20, friend: { nam 阅读全文
posted @ 2022-11-21 15:32 Zhentiw 阅读(53) 评论(0) 推荐(0)
摘要: const obj = { name: "John", age: 33, cars: [ { make: "Ford", age: 10 }, { make: "Tesla", age: 2 }, ], } as const; export type PathKeys<T> = T extends 阅读全文
posted @ 2022-11-21 00:24 Zhentiw 阅读(30) 评论(0) 推荐(0)
上一页 1 ··· 89 90 91 92 93 94 95 96 97 ··· 495 下一页