Metakit / @doeixd/metakit/tooling
makeIndex
function · packages/metakit/src/tooling.ts:44
function makeIndex(
entries: ReadonlyArray<DefinitionEntry>,
): Effect.Effect<
SemanticIndexService,
DuplicateDeclarationError | Artifact.EncodeError
>Build an in-memory SemanticIndexService from explicit DefinitionEntrys.
Rejects duplicate DeclarationIds with DuplicateDeclarationError, and
fails with the codec's error where a definition cannot be encoded for a
reason other than holding an Opaque node or a non-portable literal (a limit).