摘要: Example: expect(contextSpy.sendEncodedMessage).toHaveBeenCalledWith( expect.objectContaining({ correlationId: expect.objectContaining({ operationId: ' 阅读全文
posted @ 2022-11-03 17:57 Zhentiw 阅读(19) 评论(0) 推荐(0) 编辑
摘要: original code: Using type guards type Ticket = { workshopId: string attendeeId: string discountCode?: string } // this is a type guard function functi 阅读全文
posted @ 2022-11-03 15:35 Zhentiw 阅读(22) 评论(0) 推荐(0) 编辑
摘要: Implement a generic DeepMutable which make every parameter of an object - and its sub-objects recursively - mutable. For example type X = { readonly a 阅读全文
posted @ 2022-11-03 15:11 Zhentiw 阅读(24) 评论(0) 推荐(0) 编辑