Sha256: ba7c1cdbc8369e82244698215d1aa39525395b2b962dc76d4707c1dcca986469

Contents?: true

Size: 1.83 KB

Versions: 40

Compression:

Stored size: 1.83 KB

Contents

import { Config, CosmiconfigResult, Loaders, LoadersSync } from './types';
declare type LoaderResult = Config | null;
export declare type Loader = ((filepath: string, content: string) => Promise<LoaderResult>) | LoaderSync;
export declare type LoaderSync = (filepath: string, content: string) => LoaderResult;
export declare type Transform = ((CosmiconfigResult: CosmiconfigResult) => Promise<CosmiconfigResult>) | TransformSync;
export declare type TransformSync = (CosmiconfigResult: CosmiconfigResult) => CosmiconfigResult;
interface OptionsBase {
    packageProp?: string;
    searchPlaces?: Array<string>;
    ignoreEmptySearchPlaces?: boolean;
    stopDir?: string;
    cache?: boolean;
}
export interface Options extends OptionsBase {
    loaders?: Loaders;
    transform?: Transform;
}
export interface OptionsSync extends OptionsBase {
    loaders?: LoadersSync;
    transform?: TransformSync;
}
declare function cosmiconfig(moduleName: string, options?: Options): {
    readonly search: (searchFrom?: string) => Promise<CosmiconfigResult>;
    readonly load: (filepath: string) => Promise<CosmiconfigResult>;
    readonly clearLoadCache: () => void;
    readonly clearSearchCache: () => void;
    readonly clearCaches: () => void;
};
declare function cosmiconfigSync(moduleName: string, options?: OptionsSync): {
    readonly search: (searchFrom?: string) => CosmiconfigResult;
    readonly load: (filepath: string) => CosmiconfigResult;
    readonly clearLoadCache: () => void;
    readonly clearSearchCache: () => void;
    readonly clearCaches: () => void;
};
declare const defaultLoaders: Readonly<{
    readonly '.js': LoaderSync;
    readonly '.json': LoaderSync;
    readonly '.yaml': LoaderSync;
    readonly '.yml': LoaderSync;
    readonly noExt: LoaderSync;
}>;
export { cosmiconfig, cosmiconfigSync, defaultLoaders };
//# sourceMappingURL=index.d.ts.map

Version data entries

40 entries across 39 versions & 7 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/babel-plugin-macros/node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-5.0.7 node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-5.0.6 node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-5.0.5 node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-5.0.4 node_modules/cosmiconfig/dist/index.d.ts
disco_app-0.16.1 test/dummy/node_modules/babel-plugin-macros/node_modules/cosmiconfig/dist/index.d.ts
disco_app-0.15.2 test/dummy/node_modules/babel-plugin-macros/node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-5.0.3 node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-5.0.2 node_modules/cosmiconfig/dist/index.d.ts
disco_app-0.18.4 test/dummy/node_modules/babel-plugin-macros/node_modules/cosmiconfig/dist/index.d.ts
disco_app-0.18.1 test/dummy/node_modules/babel-plugin-macros/node_modules/cosmiconfig/dist/index.d.ts
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/babel-plugin-macros/node_modules/cosmiconfig/dist/index.d.ts
disco_app-0.14.0 test/dummy/node_modules/babel-plugin-macros/node_modules/cosmiconfig/dist/index.d.ts
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/babel-plugin-macros/node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-5.0.1 node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-4.3.5 node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-5.0.0 node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-4.3.4 node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-4.3.3 node_modules/cosmiconfig/dist/index.d.ts
trusty-cms-4.3.2 node_modules/cosmiconfig/dist/index.d.ts