UNPKG

msw-mock-gen

Version:

A Vite plugin that automatically generates MSW (Mock Service Worker) handlers from your API calls by watching TypeScript/JavaScript files and parsing URL patterns. Supports Vite 2+ and Node.js 12+ for maximum compatibility.

10 lines (9 loc) 394 B
/** * Creates the content for a mock data file * * @param hookName - Name of the hook (e.g., useAssetsQuery) * @param dataType - The data type for the hook * @param type - Whether this is a query or mutation * @returns The TypeScript content for the mock data file */ export declare function createMockDataContent(hookName: string, dataType: string, type: "query" | "mutation"): string;