diff --git a/src/resolve.ts b/src/resolve.ts index 011295f..593d58a 100644 --- a/src/resolve.ts +++ b/src/resolve.ts @@ -124,19 +124,22 @@ function _resolve(id: string, options: ResolveOptions = {}): string { return pathToFileURL(realPath).toString(); } -export function resolveSync(id: string, options?: ResolveOptions) { +export function resolveSync(id: string, options?: ResolveOptions): string { return _resolve(id, options); } -export function resolve(id: string, options?: ResolveOptions) { +export function resolve(id: string, options?: ResolveOptions): Promise { return pcall(resolveSync, id, options); } -export function resolvePathSync(id: string, options?: ResolveOptions) { +export function resolvePathSync(id: string, options?: ResolveOptions): string { return fileURLToPath(resolveSync(id, options)); } -export function resolvePath(id: string, options?: ResolveOptions) { +export function resolvePath( + id: string, + options?: ResolveOptions +): Promise { return pcall(resolvePathSync, id, options); }