UNPKG

995 BTypeScriptView Raw
1/**
2 * Created by user on 2018/4/13/013.
3 */
4export declare type IOptions = {
5 extensions?: string[];
6 paths: string[];
7 onlyDir?: boolean;
8 onlyFile?: boolean;
9};
10export declare function searchGlobSync(file: string, options: IOptions): string[];
11export declare function searchGlobSync(file: string, paths?: string[]): string[];
12export declare function _searchGlobSync(file: any, options: IOptions, cwd?: string): string[];
13export declare function searchFirstSync(file: string, options: IOptions): string;
14export declare function searchFirstSync(file: string, paths?: string[]): string;
15export declare function existsSync(path: string, options?: {
16 onlyDir?: boolean;
17 onlyFile?: boolean;
18}): boolean;
19export declare function getOptions<T extends IOptions>(options: T & IOptions): T & IOptions;
20export declare function getOptions(paths: string[]): IOptions;
21export declare function getOptions(options: IOptions | string[]): options is IOptions;
22export default searchFirstSync;