/**
 * Created by tushar on 30/12/17.
 */ import * as fs from 'fs' ; import * as R from 'ramda' ; import { configPaths , ConfigTypes , NonConfigEnv } from './configPaths' ; export type Configurations < T > = { [ key in keyof T ] : any ; } ; param process { Process } return { defaultConfig export const loadFileConfigs = < T extends NonConfigEnv > ( process ) : Configurations < ConfigTypes > => { const itar = R . mapObjIndexed ( R . ifElse ( fs . existsSync , require , R . always ( { } ) ) ) ; return itar ( configPaths ( process ) ) ; } ;