import { AxiosResponse } from 'axios'; import { Promise } from 'bluebird'; import * as fp from 'lodash/fp'; import { FindOperator } from 'typeorm'; export declare const isProductionEnv: boolean; export declare const isTestEnv: boolean; export declare function AfterDate(date: Date): FindOperator; export declare function BeforeDate(date: Date): FindOperator; export declare function execAsync(command: string): Promise; export declare const withP: (parameter: P, fn: (p: P) => R) => R; export declare const withP2: (parameter1: P1, parameter2: P2, fn: (p1: P1, p2: P2) => R) => R; export declare const withP3: (parameter1: P1, parameter2: P2, parameter3: P3, fn: (p1: P1, p2: P2, p3: P3) => R) => R; export declare const fnWithP2: (parameter1: P1, parameter2: P2) => (fn: (p1: P1, p2: P2) => R) => R; export declare const fnWithP3: (parameter1: P1, parameter2: P2, parameter3: P3) => (fn: (p1: P1, p2: P2, p3: P3) => R) => R; export declare function toHHMMSS(num: string): string; export declare function r(o: any, { transform, stringify, depth }?: { transform?: boolean; stringify?: boolean; depth?: number; }): string; /** * https://www.typescriptlang.org/docs/handbook/mixins.html * @param derivedCtor * @param baseCtors */ export declare function applyMixins(derivedCtor: any, baseCtors: any[]): void; export declare function download(url: string, to: string): Promise; export declare function fixedPath(name: string, length?: number, pos?: number): string; export declare function traverseDir(dir: string): string[]; export declare function resolveBasename(dir: string, withExt?: boolean): string; /** * 在一个区间内取值,num 大于 max 时返回 max,num 小于 max 时返回 min */ export declare function numberInterval(min: number, max: number, num: number): number; export declare function parseJSONIfCould(value?: string): any; export declare function promisify R, R>(fn: T, bind?: any): (...args: Parameters) => Promise; export declare function isPromiseAlike(value: any): value is Promise; export declare type FutureResolveType = ((...args: any[]) => Promise | T) | T; export declare const fnResolve: (fn: FutureResolveType) => (...args: any[]) => Promise; export declare const noNullFilter: (source: Partial) => fp.LodashFilter2x1;