import Metalsmith from 'metalsmith'; import sass from 'sass'; import { FileInterface, MetalsmithStrictFiles, MetalsmithStrictWritableFiles } from '../utils/metalsmith'; import { FunctionTypeOnly } from '../utils/types'; declare type OptionsGenerator = string | T | ((files: MetalsmithStrictWritableFiles, metalsmith: Metalsmith, defaultOptions: DefaultOptionsInterface) => T | Promise); export interface SassOptionsObjectInterface extends Omit { /** * Glob patterns that match files that use the Indented Syntax. * For files that match the pattern, set Dart Sass's indentedSyntax option to true. * @see https://sass-lang.com/documentation/syntax#the-indented-syntax * @see https://sass-lang.com/documentation/js-api#indentedsyntax */ indentedSyntax?: string | ReadonlyArray; } export interface OptionsInterface { readonly pattern: ReadonlyArray; readonly sassOptions: SassOptionsObjectInterface | ((context: { filename: string; filedata: FileInterface; sourceFileFullpath: string; destinationFileFullpath: string; metalsmith: Metalsmith; metalsmithFiles: MetalsmithStrictFiles; pluginOptions: OptionsInterface; }) => sass.Options | Promise); readonly renamer: (filename: string) => string | Promise; readonly dependenciesKey: string | false | null; } export interface DefaultOptionsInterface extends Omit { readonly sassOptions: Exclude>; } declare type InputSassImporter = string | Record | sass.Importer; declare type InputSassFunctionsValue = string | Record | Required['functions'][string]; export interface InputSassOptionsInterface extends Omit { sourceMap?: Exclude['sourceMap'], string>; importer?: InputSassImporter | InputSassImporter[]; functions?: Record; } export interface InputOptionsInterface extends Omit { readonly pattern: string | OptionsInterface['pattern']; readonly sassOptions: string | Exclude | InputSassOptionsInterface; readonly renamer: string | OptionsInterface['renamer'] | boolean | null; } export declare type InputOptions = OptionsGenerator>; export declare const defaultOptions: DefaultOptionsInterface; export declare function normalizeOptions(files: MetalsmithStrictWritableFiles, metalsmith: Metalsmith, opts: InputOptions): Promise; export {}; //# sourceMappingURL=index.d.ts.map