Files
DefinitelyTyped/types/codependency/index.d.ts
Andy b6c343f2b3 Apply new lint rules to yet more packages (#15548)
* Apply new lint rules to yet more packages

* Fix leaflet lint
2017-03-31 11:01:26 -07:00

30 lines
867 B
TypeScript

// Type definitions for codependency 0.1
// Project: https://github.com/Wizcorp/codependency
// Definitions by: Morgan Benton <https://github.com/morphatic>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export as namespace codependency;
interface DependencyInfo {
supportedRange: string|null;
installedVersion: string|null;
isInstalled: boolean|null;
isValid: boolean|null;
pkgPath: string;
}
interface RequirePeerFunctionOptions {
optional?: boolean;
dontThrow?: boolean;
}
interface RequirePeerFunction {
(name: string, options?: RequirePeerFunctionOptions): any;
resolve(name: string): DependencyInfo;
}
export function register(baseModule: NodeModule, options?: {index: string[]}): RequirePeerFunction;
export function get(middlewareName: string): RequirePeerFunction;