/** * Importing ES modules either from a local path, or from a url. * * The imported module must be ESM. A good indicator is whether * the "type" property in a package.json is set to "module" if * node is used. * * Read more on https://inlang.com/documentation/config */ import type { $fs } from "./$fs.js"; export type $import = (uri: string) => Promise; /** * Initializes the $import function. * * @example * const $import = initialize$import({ fs: fs, fetch }); * const module = await $import('./some-module.js'); */ export declare function initialize$import(args: { /** the fs from which the file can be read */ fs: $fs; /** http client implementation */ fetch: typeof fetch; }): (uri: string) => ReturnType; /** * Importing ES modules either from a local path, or from a url. * * The imported module must be ESM. A good indicator is whether * the "type" property in a package.json is set to "module" if * node is used. * * Read more on https://inlang.com/documentation/config */ declare function $import(uri: string, environment: { /** the fs from which the file can be read */ fs: $fs; /** http client implementation */ fetch: typeof fetch; }): Promise; export {}; //# sourceMappingURL=$import.d.ts.map