Editor Scripting API
    Preparing search index...

    Interface ImportMeta

    The type of import.meta.

    If you need to declare that a given property exists on import.meta, this type may be augmented via interface merging.

    interface ImportMeta {
        resolve(path: string): string;
        resolve(specifier: string, parent?: string | URL): string;
        url: string;
    }
    Index

    Properties

    Methods

    Properties

    url: string

    The absolute file: URL of the module.

    Methods

    • Parameters

      • path: string

      Returns string

    • Provides a module-relative resolution function scoped to each module, returning the URL string.

      Second parent parameter is only used when the --experimental-import-meta-resolve command flag enabled.

      Parameters

      • specifier: string

        The module specifier to resolve relative to parent.

      • Optionalparent: string | URL

        The absolute parent module URL to resolve from.

      Returns string

      The absolute (file:) URL string for the resolved module.

      v20.6.0