Skip to main content
ImportMeta.resolve - node__module.d.ts - Node documentation
method ImportMeta.resolve

Usage in Deno

```typescript import { type ImportMeta } from "node:node__module.d.ts"; ```
ImportMeta.resolve(
specifier: string,
parent?:
string
| URL
| undefined
,
): 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`.
optional
parent:
string
| URL
| undefined
The absolute parent module URL to resolve from.

Return Type

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