/** * Returns Symbol by name. * See: https://stackoverflow.com/questions/50453640/how-can-i-get-the-value-of-a-symbol-property */ export declare function getSymbolByName(target: T, name?: string): keyof T; export declare function removeDuplicates(arr: T[]): T[]; export declare function resolvePackageRoot(packageName: string): string; export declare function getPackageVersion(packageName: string): string; export declare function callWithTimeout(fn: () => T, timeout?: number, timeoutMsg?: string): Promise; export declare function stringifyLocation({ line, column }: { line: number; column?: number; }): string; export declare function omit(obj: T, key: K): Omit; export declare function removeUndefined(obj: T): T; export declare function toArray(value: T | T[]): T[]; export declare function trimTrailingSlash(s: string): string; export declare function booleanDefault(value: unknown, defaultValue: boolean): boolean; export declare function calculateSha1(buffer: Buffer | string): string; export declare function throwIf(condition: unknown, message: string): void; /** * Save file synchronously, create directory if needed. */ export declare function saveFileSync(filePath: string, content: string): void; export declare function toBoolean(value: T): value is NonNullable; export declare function areSetsEqual(set1: Set, set2: Set): boolean; export declare function escapeHtml(str: string): string; /** * Replace placeholders in a template string. * Example: * 'Hello, {name}' + {name: 'John' } -> 'Hello, John' */ export declare function substitute(template: string, params: Record): string; //# sourceMappingURL=index.d.ts.map