Open sunrabbit123 opened 1 year ago
type NonOptionalKeys<T> = { [P in keyof T]: undefined extends T[P] ? never : P }[keyof T]; type Child<T> = { [P in NonOptionalKeys<T>]: T[P] } export interface ListWidget { "type": "list", "minimum_count": number, "maximum_count": number, "collapsable"?: boolean, //default to false, means all expanded "each": Child<ListWidget>; } type ListChild = Child<ListWidget> declare let x: ListChild; x.type;
x should be any, Because Child<ListWidget> Overflow caused by circular reference
Child<ListWidget>
checker.ts search isDeeplyNestedType
isDeeplyNestedType
x should be any, Because
Child<ListWidget>
Overflow caused by circular reference