types/definition.types.ts

types/definition.types.ts is a file in Bane's Lab Site. 15 lines of code and 1 definition.

import type { DefinitionLocation } from "#types/anatomy.types";
import type { EvidenceNode } from "#types/evidence.types";

export interface DefinitionIndex {
    readonly citedDefinition: (name: string, file?: string | null) => DefinitionLocation | null;
    readonly definitionsNamed: (name: string) => readonly DefinitionLocation[];
    readonly moduleDefinitionsNamed: (name: string) => readonly DefinitionLocation[];
    readonly moduleDefinitionsNamedFrom: (name: string, from: string) => readonly DefinitionLocation[];
    readonly filesMatching: (parts: readonly string[], from: string) => readonly string[];
    readonly listDefinitions: () => readonly DefinitionLocation[];
    readonly locateNode: (node: EvidenceNode) => string | null;
    readonly resolveFolder: (text: string, from?: string | null) => string | null;
    readonly resolveOwnPath: (text: string, from: string) => string | null;
    readonly resolvePath: (text: string, from?: string | null) => string | null;
    readonly resolveSpecifier: (specifier: string, fromPath: string) => string | null;
}