import type { ApiClassDeclaration, ApiCustomElementDeclaration, ApiJson, ApiMixinDeclaration, ApiModule, ApiReferenceWithTypeArguments } from "../apiJson.js"; /** Everything is indexed by the module path. */ export type IndexedModules = Map; export interface IndexedModule { readonly apiModule: ApiModule; readonly classLike?: ApiClassDeclaration | ApiCustomElementDeclaration | ApiMixinDeclaration; /** * Superclasses ancestors. Sorted from most immediate to furthest * ancestor. * * The type reference may refer to a local module or an external package. * * If type argument were passed, they will be included. * In the docs UI, it makes the most sense to show type arguments only for the * immediate superclass. */ ancestors?: ApiReferenceWithTypeArguments[]; /** Includes only direct children. */ children?: IndexedModule[]; } /** * Compute a list of subclasses and parent hierarchy for each class in the api.json. * Everything is indexed by the module path. * * @param apiJson */ export function createIndex(apiJson: Pick): IndexedModules;