UNPKG

579 BTypeScriptView Raw
1export declare function flatMap<T, U>(arr: T[], fn: (i: T) => U[]): U[];
2export declare function mapValues<T extends object, TResult>(obj: {
3 [P in keyof T]: T[P];
4}, fn: (i: T[keyof T], k: keyof T) => TResult): {
5 [P in keyof T]: TResult;
6};
7export declare function exists(path: string): Promise<boolean>;
8export declare function resolvePackage(id: string, paths: {
9 paths: string[];
10}): string;
11export declare function loadJSON(path: string): Promise<any>;
12export declare function compact<T>(a: (T | undefined)[]): T[];
13export declare function uniq<T>(arr: T[]): T[];