// Type definitions for webpack-config-utils 2.3 // Project: https://github.com/kentcdodds/webpack-config-utils#readme // Definitions by: Martin Hochel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 export function getIfUtils( env: { [P in E]: boolean | string } | E, vars?: Array ): IfUtils; export function removeEmpty(input: Array): T[]; export function removeEmpty(input: { [P in keyof T]: T[P] }): NonEmptyObject; export function propIf(a: Falsy, value: any, alternate: E): E; export function propIf(a: any, value: I, alternate: any): I; export function propIfNot(a: Falsy, value: I, alternate: any): I; export function propIfNot(a: any, value: any, alternate: E): E; export type Falsy = false | '' | 'false' | undefined | null | 0; export type DefinedObjKeys = ({ [P in keyof T]: T[P] extends undefined ? never : P })[keyof T]; export type NonEmptyObject = DefinedObjKeys> = { [PP in P]: T[PP] }; export type EnvVars = 'production' | 'prod' | 'test' | 'development' | 'dev'; export interface IfUtilsFn { (value: Y, alternate?: N): Y | N; (): boolean; } export interface IfUtils { ifDevelopment: IfUtilsFn; ifNotDevelopment: IfUtilsFn; ifDev: IfUtilsFn; ifNotDev: IfUtilsFn; ifProduction: IfUtilsFn; ifNotProduction: IfUtilsFn; ifProd: IfUtilsFn; ifNotProd: IfUtilsFn; ifTest: IfUtilsFn; ifNotTest: IfUtilsFn; [key: string]: IfUtilsFn; }