Type Alias TsRecurse<CurrentRecursion>

TsRecurse<CurrentRecursion>: TsRecursionArray[CurrentRecursion] extends TsRecursionTracker
    ? TsRecursionArray[CurrentRecursion]
    : TsTooMuchRecursion

Increments a TypeScript recursion depth tracker.

Type Parameters

import type {
TsRecursionTracker,
TsRecursionStart,
TsRecurse,
TsTooMuchRecursion,
} from '@augment-vir/common';

export type SomeType<Depth extends TsRecursionTracker = TsRecursionStart> =
Depth extends TsTooMuchRecursion
? 'Error: recursive object depth is too deep.'
: SomeType<TsRecurse<Depth>>;