# types/definition.types.ts

> 14 lines of code and 1 definition.

Tree: Site tree
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/tree#file-types-definition-types-ts
Source text: https://banes-lab.com/source/tree/types/definition.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/tree/types.md), after [types/coverage.types.ts](https://banes-lab.com/source/tree/types/coverage.types.ts.md) and before [types/diagram.types.ts](https://banes-lab.com/source/tree/types/diagram.types.ts.md).

## Definitions

- `DefinitionIndex` (interface_declaration, line 4, exported)

## Source

```typescript
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 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;
}
```
