import type { Resolver } from './resolver/index.js'; import { type Transformer } from './transformer/index.js'; export type Watcher = { close: () => Promise; }; export type LocalsConvention = 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly' | undefined; export interface RunnerOptions { pattern: string; watch?: boolean | undefined; /** * Style of exported class names. * @default undefined */ localsConvention?: LocalsConvention | undefined; declarationMap?: boolean | undefined; transformer?: Transformer | undefined; resolver?: Resolver | undefined; /** * The option compatible with sass's `--load-path`. It is an array of relative or absolute paths. * @example ['src/styles'] * @example ['/home/user/repository/src/styles'] */ sassLoadPaths?: string[] | undefined; /** * The option compatible with less's `--include-path`. It is an array of relative or absolute paths. * @example ['src/styles'] * @example ['/home/user/repository/src/styles'] */ lessIncludePaths?: string[] | undefined; /** * The option compatible with webpack's `resolve.alias`. It is an object consisting of a pair of alias names and relative or absolute paths. * @example { style: 'src/styles', '@': 'src' } * @example { style: '/home/user/repository/src/styles', '@': '/home/user/repository/src' } */ webpackResolveAlias?: Record | undefined; /** * The option compatible with postcss's `--config`. It is a relative or absolute path. * @example '.' * @example 'postcss.config.js' * @example '/home/user/repository/src' */ postcssConfig?: string | undefined; /** * Generate `.d.css.ts` instead of `.css.d.ts`. * @default false */ arbitraryExtensions?: boolean | undefined; /** * Only generate .d.ts and .d.ts.map for changed files. * @default true */ cache?: boolean | undefined; /** * Strategy for the cache to use for detecting changed files. * @default 'content' */ cacheStrategy?: 'content' | 'metadata' | undefined; /** * What level of logs to report. * @default 'info' */ logLevel?: 'debug' | 'info' | 'silent' | undefined; /** Working directory path. */ cwd?: string | undefined; /** Output directory for generated files. */ outDir?: string | undefined; } type OverrideProp = Omit & { [P in K]: V; }; /** * Run typed-css-module. * @param options Runner options. * @returns Returns `Promise` if `options.watch` is `true`, `Promise` if `false`. */ export declare function run(options: OverrideProp): Promise; export declare function run(options: RunnerOptions): Promise; export {};