摘要: 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)