File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,19 +204,6 @@ declare module "module" {
204204 global {
205205 interface ImportMeta extends ImportMetaDOMCompat {
206206 url : string ;
207- /**
208- * @experimental
209- * This feature is only available with the `--experimental-import-meta-resolve`
210- * command flag enabled.
211- *
212- * Provides a module-relative resolution function scoped to each module, returning
213- * the URL string.
214- *
215- * @param specified The module specifier to resolve relative to `parent`.
216- * @param parent The absolute parent module URL to resolve from. If none
217- * is specified, the value of `import.meta.url` is used as the default.
218- */
219- resolve ( specified : string , parent ?: string | URL ) : Promise < string > ;
220207 }
221208 }
222209 export = Module ;
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ import { URL } from "node:url";
55 const importmeta : ImportMeta = { } as any ; // Fake because we cannot really access the true `import.meta` with the current build target
66 importmeta . url ; // $ExpectType string
77 importmeta . resolve ! ( "local" ) ; // $ExpectType Promise<string> || string
8- importmeta . resolve ! ( "local" ) ; // $ExpectType Promise<string> || string
98}
9+
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { URL } from "node:url";
44{
55 const importmeta : ImportMeta = { } as any ; // Fake because we cannot really access the true `import.meta` with the current build target
66 importmeta . url ; // $ExpectType string
7+ importmeta . resolve ! ( "local" ) ; // $ExpectType Promise<string>
78 importmeta . resolve ! ( "local" , "/parent" ) ; // $ExpectType Promise<string>
89 importmeta . resolve ! ( "local" , new URL ( "https://parent.module" ) ) ; // $ExpectType Promise<string>
910}
Original file line number Diff line number Diff line change @@ -5,5 +5,4 @@ import { URL } from "node:url";
55 const importmeta : ImportMeta = { } as any ; // Fake because we cannot really access the true `import.meta` with the current build target
66 importmeta . url ; // $ExpectType string
77 importmeta . resolve ! ( "local" ) ; // $ExpectType Promise<string> || string
8- importmeta . resolve ! ( "local" ) ; // $ExpectType Promise<string> || string
98}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { URL } from "node:url";
44{
55 const importmeta : ImportMeta = { } as any ; // Fake because we cannot really access the true `import.meta` with the current build target
66 importmeta . url ; // $ExpectType string
7+ importmeta . resolve ! ( "local" ) ; // $ExpectType Promise<string>
78 importmeta . resolve ! ( "local" , "/parent" ) ; // $ExpectType Promise<string>
89 importmeta . resolve ! ( "local" , new URL ( "https://parent.module" ) ) ; // $ExpectType Promise<string>
910}
You can’t perform that action at this time.
0 commit comments