typedoc icon indicating copy to clipboard operation
typedoc copied to clipboard

Sorting of union types is non-deterministic

Open imtuanpham opened this issue 1 year ago • 2 comments

This issue is related to https://github.com/TypeStrong/typedoc/issues/2502 but applies to non-literal types. Sorting of union types is non-deterministic.

Steps to reproduce the bug

export type Type1 = 'type1';
export type Type2 = { prop1: string; prop2: boolean };

/**
 * Some Interface
 */
export interface SomeInterface {
  someUnionType: Type1 | Type2;
}

Expected

image

Actual

Most of the times it shows image

But sometimes it shows image

(This is causing our CI pipeline to fail as we have a job to ensure the API Doc changes are included in pull requests)

Environment

imtuanpham avatar Oct 16 '24 05:10 imtuanpham