4
0

resolve.d.ts 1.0 KB

1234567891011121314151617181920212223242526272829
  1. /**
  2. * The “Resolver Algorithm Specification” as detailed in the Node docs (which is
  3. * sync and slightly lower-level than `resolve`).
  4. *
  5. * @param {string} specifier
  6. * `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.
  7. * @param {URL} base
  8. * Full URL (to a file) that `specifier` is resolved relative from.
  9. * @param {Set<string>} [conditions]
  10. * Conditions.
  11. * @param {boolean} [preserveSymlinks]
  12. * Keep symlinks instead of resolving them.
  13. * @returns {URL}
  14. * A URL object to the found thing.
  15. */
  16. export function moduleResolve(specifier: string, base: URL, conditions?: Set<string>, preserveSymlinks?: boolean): URL;
  17. /**
  18. * @param {string} specifier
  19. * @param {{parentURL?: string, conditions?: Array<string>}} context
  20. * @returns {{url: string, format?: string | null}}
  21. */
  22. export function defaultResolve(specifier: string, context?: {
  23. parentURL?: string;
  24. conditions?: Array<string>;
  25. }): {
  26. url: string;
  27. format?: string | null;
  28. };
  29. //# sourceMappingURL=resolve.d.ts.map