local.ts(1,17): error TS5088: The inferred type of 'array' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary.
local.ts(5,17): error TS5088: The inferred type of 'tuple' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary.
local.ts(9,17): error TS5088: The inferred type of 'readonlyTuple' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary.
local.ts(13,17): error TS5088: The inferred type of 'union' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary.


==== local.ts (4 errors) ====
    export function array() {
                    ~~~~~
!!! error TS5088: The inferred type of 'array' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary.
        type Recursive = Recursive[];
        return null as unknown as Recursive;
    }
    export function tuple() {
                    ~~~~~
!!! error TS5088: The inferred type of 'tuple' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary.
        type Recursive = [Recursive];
        return null as unknown as Recursive;
    }
    export function readonlyTuple() {
                    ~~~~~~~~~~~~~
!!! error TS5088: The inferred type of 'readonlyTuple' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary.
        type Recursive = readonly [Recursive];
        return null as unknown as Recursive;
    }
    export function union() {
                    ~~~~~
!!! error TS5088: The inferred type of 'union' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary.
        type Recursive = string | Recursive[];
        return null as unknown as Recursive;
    }
    
==== nameable.ts (0 errors) ====
    export type RecursiveArray = RecursiveArray[];
    export type RecursiveTuple = readonly [RecursiveTuple];
    declare const array: RecursiveArray;
    declare const tuple: RecursiveTuple;
    export const namedArray = array;
    export const namedTuple = tuple;
    export function finite() {
        type Nested = [[[[[[[[[[[[[number]]]]]]]]]]]]];
        return null as unknown as Nested;
    }
    export function finiteArray() {
        type Nested = number[][][][][][][][][][][][][];
        return null as unknown as Nested;
    }
    