UNPKG

kt-extendscript-builder

Version:

Vite based builder for transpile TypeScript to ExtendScript

46 lines (45 loc) 1.64 kB
import { PonyfillItem } from '../../types'; export declare class PonyfillCollector { /** * Collects ponyfills from specified paths and search locations * @param userPonyfillsPaths Path(s) to custom ponyfill files * @param searchPaths Path(s) to search for ponyfill files * @returns Combined list of base and custom ponyfills * @throws Error if loading or searching fails */ collect(userPonyfillsPaths?: string[] | string, searchPaths?: string[] | string): PonyfillItem[]; /** * Loads ponyfills from a file * @param ponyfillsPath Path to ponyfills file * @returns Array of ponyfill items * @throws Error if file cannot be loaded or parsed */ private loadPonyfills; /** * Searches recursively for ponyfill files in multiple paths * @param searchPaths Directories to search * @returns Array of ponyfill file paths * @throws Error if directory cannot be read */ private searchPonyfillFiles; private searchDirectory; /** * Selects valid ponyfills from a module * @param ponyfills Module containing ponyfills * @returns Array of valid ponyfill items */ private selectPonyfills; /** * Validates ponyfill items * @param ponyfills Array of potential ponyfill items * @returns Array of valid ponyfill items */ private validatePonyfills; /** * Merges ponyfills, avoiding duplicates based on find property * @param existing Existing ponyfills * @param newPonyfills New ponyfills to add * @returns Merged array of ponyfills */ private mergePonyfills; }