Mrlgm

Results 24 comments of Mrlgm

```typescript interface Foo { [key: string]: any; [key: number]: any; bar(): void; } type RemoveIndexSignature = { [K in keyof T as string extends K ? never : number extends...

```typescript type Push = [...T, V] // 测试用例 type Arr0 = Push // [1] type Arr1 = Push // [1, 2, 3, 4] ```

```typescript type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never // 测试用例 type U0 = UnionToIntersection...

```typescript type EmptyObject = { [P in PropertyKey]: never } // 测试用例 const shouldPass: EmptyObject = {}; // 可以正常赋值 const shouldFail: EmptyObject = { // 将出现编译错误 prop: "TS" } type...