上一页 1 ··· 87 88 89 90 91 92 93 94 95 ··· 494 下一页
摘要: Implement the type version of Object.fromEntries For example: interface Model { name: string; age: number; locations: string[] | null; } type ModelEnt 阅读全文
posted @ 2022-11-28 15:54 Zhentiw 阅读(31) 评论(0) 推荐(0)
摘要: Implement a generic GetReadonlyKeys<T> that returns a union of the readonly keys of an Object. For example interface Todo { readonly title: string rea 阅读全文
posted @ 2022-11-27 19:47 Zhentiw 阅读(139) 评论(0) 推荐(0)
摘要: import { Machine, actions } from "xstate"; const { raise } = actions; // Demostrate `raise` action const stubbornMachine = Machine({ id: "raisedmo", i 阅读全文
posted @ 2022-11-26 17:50 Zhentiw 阅读(49) 评论(0) 推荐(0)
摘要: Implement a generic IsRequiredKey<T, K> that return whether K are required keys of T . For example type A = IsRequiredKey<{ a: number, b?: string },'a 阅读全文
posted @ 2022-11-26 16:27 Zhentiw 阅读(30) 评论(0) 推荐(0)
摘要: 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 阅读(35) 评论(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 阅读(27) 评论(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 阅读(26) 评论(0) 推荐(0)
摘要: import { assign, createMachine } from "xstate"; type FetchStates = | { value: "idle"; context: FetchContext & { results: []; message: ""; }; } | { val 阅读全文
posted @ 2022-11-23 16:39 Zhentiw 阅读(61) 评论(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)
上一页 1 ··· 87 88 89 90 91 92 93 94 95 ··· 494 下一页