20 lines
647 B
TypeScript
20 lines
647 B
TypeScript
import { LoaderContext } from '@rspack/core';
|
|
|
|
interface CsvLoaderOptions {
|
|
delimiter?: string;
|
|
quote?: string;
|
|
escape?: string;
|
|
bom?: boolean;
|
|
comment?: string | false;
|
|
trim?: boolean;
|
|
/** Generate TypeScript declaration file (.d.ts) */
|
|
emitTypes?: boolean;
|
|
/** Output directory for generated type files (relative to output path) */
|
|
typesOutputDir?: string;
|
|
/** Write .d.ts files to disk (useful for dev server) */
|
|
writeToDisk?: boolean;
|
|
}
|
|
declare function csvLoader(this: LoaderContext<CsvLoaderOptions>, content: string): string | Buffer;
|
|
|
|
export { type CsvLoaderOptions, csvLoader as default };
|