histoire
Version:
A fast story book powered by Vite
15 lines • 914 B
TypeScript
/**
* Finds the built asset URL corresponding to a mocked raw import id.
*/
export declare function findStaticMockImportUrl(source: string, rawId: string, importerUrl: string): any;
/**
* Finds the registered mock URL referenced by a Vite dynamic import loader.
*/
export declare function findStaticMockLoaderImportUrl(loaderSource: string, mockUrls: Iterable<string>): string;
/** Resolves a mocked source import to the hashed asset emitted by Vite build. */
export declare function resolveStaticMockUrl(rawId: string, importer: string): Promise<any>;
/** Builds a best-effort URL when the transformed source does not expose a match. */
export declare function resolveFallbackUrl(rawId: string, importer: string): string;
/** Adds a Vitest-style timestamp query that MSW strips when matching mocks. */
export declare function getTimestampedMockUrl(url: string): string;
//# sourceMappingURL=mock-urls.d.ts.map