// Type definitions for Purgecss 1.0 // Project: Purgecss // Definitions by: Ffloriel https://github.com/Ffloriel // JounQin https://github.com/JounQin export = Purgecss declare class Purgecss { options: Purgecss.Options constructor(options: Purgecss.Options | string) loadConfigFile(configFile: string): Purgecss.Options checkOptions(options: Purgecss.Options): void purge(): Array extractFileSelector( files: Array, extractors?: Array ): Set extractRawSelector( content: Array, extractors?: Array ): Set getFileExtractor( filename: string, extractors: Array ): Object extractorSelectors(content: string, extractor: Object): Set getSelectorsCss(css: string, selectors: Set): string isIgnoreAnnotation(node: Object, type: Purgecss.IgnoreType): boolean isRuleEmpty(node: Object): boolean shouldKeepSelector( selectorsInContent: Set, selectorsInRule: Array ) :boolean } declare namespace Purgecss { export interface Options { content: Array css: Array extractors?: Array whitelist?: Array whitelistPatterns?: Array whitelistPatternsChildren?: Array output?: string stdout?: boolean stdin?: boolean keyframes?: boolean fontFace?: boolean rejected?: boolean } export interface ExtractorsObj { extractor: Object extensions: Array } export interface FileResult { file: string | null css: string rejected: Array | null } export interface RawContent { raw: string extension: string } export type IgnoreType = "next" | "start" | "end" }