kt-extendscript-builder
Version:
Vite based builder for transpile TypeScript to ExtendScript
30 lines (29 loc) • 1.07 kB
TypeScript
import { BuildOptions, DependencyRule } from '../../types';
/**
* A resolver class for managing and applying option dependency rules to build options.
*
* This class allows for registering one or multiple options dependency rules and
* resolving them against a set of build options. Each rule is a function that
* can modify the build options.
*/
export declare class OptionsRuleResolver {
/**
* The collection of dependency rules to apply.
* @private
*/
private rules;
constructor();
/**
* Adds one or more dependency rules to the resolver.
*
* @param rule - A single dependency rule or an array of rules to add
*/
addRules(rule: DependencyRule | DependencyRule[] | Record<string, DependencyRule>): void;
/**
* Applies all registered dependency rules to the provided build options.
*
* @param options - The initial build options to transform
* @returns The transformed build options after applying all rules
*/
resolve(options: Partial<BuildOptions>): Partial<BuildOptions>;
}