Wang Language - v0.21.5
    Preparing search index...

    Class ModuleResolverAbstract

    Base interface for module resolvers Implement this interface to provide custom module resolution

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Check if a module exists

      Parameters

      • modulePath: string

        The module path to check

      • OptionalfromPath: string

        The path of the importing module (for relative resolution)

      Returns Promise<boolean>

      Promise resolving to true if module exists

    • Get module metadata (optional)

      Parameters

      • modulePath: string

        The module path

      Returns Promise<null | Record<string, any>>

      Promise resolving to module metadata

    • List available modules (for autocomplete/suggestions)

      Parameters

      • Optionalprefix: string

        Optional prefix to filter modules

      Returns Promise<string[]>

      Promise resolving to array of available module paths

    • Resolve a module path to its source code

      Parameters

      • modulePath: string

        The module path to resolve (e.g., "./utils", "@wang/core", "https://...")

      • OptionalfromPath: string

        The path of the importing module (for relative resolution)

      Returns Promise<ModuleResolution>

      Promise resolving to module code and resolved path