// Type definitions for codependency 0.1 // Project: https://github.com/Wizcorp/codependency // Definitions by: Morgan Benton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// export as namespace codependency; export interface DependencyInfo { supportedRange: string|null; installedVersion: string|null; isInstalled: boolean|null; isValid: boolean|null; pkgPath: string; } export interface RequirePeerFunctionOptions { optional?: boolean; dontThrow?: boolean; } export 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;