@sketch-hq/sketch-assistant-utils
Version:
Utility functions and types for Sketch Assistants.
27 lines • 1.38 kB
TypeScript
import { IgnoreConfig, SketchFile, AssistantPackageMap, AssistantDefinition, ProcessedSketchFile } from '@sketch-hq/sketch-assistant-types';
/**
* Prune ignored pages that are no longer present in a SketchFile.
*/
export declare const prunePages: (ignore: IgnoreConfig, file: SketchFile) => IgnoreConfig;
/**
* Prune ignore directives that relate to Assistants not present in an AssistantPackageMap.
*/
export declare const pruneAssistants: (ignore: IgnoreConfig, assistants: AssistantPackageMap) => IgnoreConfig;
/**
* Prune ignored rules not present in an Assistant Definition.
*/
export declare const pruneRules: (ignore: IgnoreConfig, assistant: AssistantDefinition) => IgnoreConfig;
/**
* Prune ignored objects not present in a ProcessedSketchFile.
*/
export declare const pruneObjects: (ignore: IgnoreConfig, processedFile: ProcessedSketchFile) => IgnoreConfig;
/**
* Determine whether a given rule is full ignored, according to a IgnoreConfig. Full ignored means
* it both has an entry, and has been set to { allObjects: true }.
*/
export declare const isRuleFullIgnored: (ignore: IgnoreConfig, assistantName: string, ruleName: string) => boolean;
/**
* Return the set of ignored objects for a rule.
*/
export declare const getIgnoredObjectIdsForRule: (ignore: IgnoreConfig, assistantName: string, ruleName: string) => string[];
//# sourceMappingURL=index.d.ts.map