摘要:
This utility does not return a transformed type. Instead, it serves as a marker for a contextual this type. Note that the noImplicitThis flag must be 阅读全文
摘要:
We have the following code which has compile error: async function readData(event?: Event | unknown): Promise<void> { // ... let text: string | undefi 阅读全文
摘要:
original code: Using type guards type Ticket = { workshopId: string attendeeId: string discountCode?: string } // this is a type guard function functi 阅读全文
摘要:
Implement a generic DeepMutable which make every parameter of an object - and its sub-objects recursively - mutable. For example type X = { readonly a 阅读全文
摘要:
Convert a property of type literal (label type) to a primitive type. For example type X = { name: 'Tom', age: 30, married: false, addr: { home: '12345 阅读全文
摘要:
Please complete type IsInteger<T>, type T inherits from number, if T is an integer return it, otherwise return never. /* _____________ Your Code Here 阅读全文
摘要:
Get the middle element of the array by implementing a GetMiddleElement method, represented by an array If the length of the array is odd, return the m 阅读全文
摘要:
Given an array of unique elements, return all possible subsequences. A subsequence is a sequence that can be derived from an array by deleting some or 阅读全文
摘要:
Given an array of strings, do Permutation & Combination. It's also useful for the prop types like video controlsList // expected to be `"foo" | "bar" 阅读全文