monaco-definition-provider - v2.0.0
    Preparing search index...

    Class WorkspaceIndex

    Tracks open Monaco models and resolves import specifiers to documents.

    Resolution order:

    1. the host's resolveModuleUri hook (when provided) supplies candidate URIs, otherwise built-in Python path heuristics compute them;
    2. candidates are matched against open models;
    3. unmatched candidates are offered to the host's loadFile hook — returned content becomes a real Monaco model so later navigation works natively.

    Implements

    Index

    Constructors

    Methods

    • Resolve an import specifier (e.g. Python "..utils.helpers") from a file to a document — checking open models first, then asking the host's loadFile hook. Returns null when nothing can provide the file.

      Parameters

      • importPath: string
      • fromUri: string

      Returns Promise<WorkspaceDocument | null>