4 ms·
You can't do that because recursion is a feature, not a bug. It lets you do really cool things, such as: type MultiDimArray<T> = T[] | MultiDimArray<T>[];
by n2d4 3y ago
You can't do that because recursion is a feature, not a bug. It lets you do really cool things, such as:
type MultiDimArray<T> = T[] | MultiDimArray<T>[];
type LinkedList<T> = {
value: T,
next: LinkedList<T> | null,
};
type Json = string | number | null | Json[] | { [k: string]: Json };