import type fs from 'node:fs'; import type { Options, SassColor, SassString } from 'sass'; import type { OrderedMap } from 'immutable'; export interface IExposeItem { selector?: string; map: OrderedMap; } export interface IOutFileOption { getVarName?: (key: string) => string; getVarValue?: (key: string) => string; replacement?: { '{{filepath}}'?: string; '{{variableName}}'?: string; } & Record; outfile?: string; } export interface IGenerateResult { scss: { variables?: string; }; js: { extendColors?: string; }; meta: { name: string; value: string; }[]; mergedMap: Record>; } export type IUtilOutFileOption = Pick | boolean; export type IMainOutFileOption = Pick | boolean; export interface OutputFileSystem { copyFileSync: typeof fs.copyFileSync; writeFileSync: typeof fs.writeFileSync; } export interface IGenerateOption { entryPoint: string; outdir?: string; files?: { extendColors?: IMainOutFileOption; variables?: IMainOutFileOption; root?: IUtilOutFileOption; util?: IUtilOutFileOption; export?: IUtilOutFileOption; }; sassOptions?: Options<'sync'>; outputFileSystem?: OutputFileSystem; write?: boolean; intelliSense?: { getVarName?: (key: string) => string; getVarValue?: (key: string) => string; }; withOpacityValue?: boolean; injectBase?: boolean; injectSelector?: string; generateResult?: IGenerateResult; } export type FileEnumType = 'extendColors' | 'variables' | 'root' | 'export' | 'util';