// Type definitions for classnames 2.2 // Project: https://github.com/JedWatson/classnames // Definitions by: Dave Keen // Adi Dahiya // Jason Killian // Sean Kelley // Michal Adamczyk // Marvin Hagemeister // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 type ClassValue = string | number | ClassDictionary | ClassArray | undefined | null | boolean; interface ClassDictionary { [id: string]: any; } // This is the only way I found to break circular references between ClassArray and ClassValue // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540 interface ClassArray extends Array { } // tslint:disable-line no-empty-interface type ClassNamesFn = (...classes: ClassValue[]) => string; type ClassNamesExport = ClassNamesFn & { default: ClassNamesFn }; declare const classNames: ClassNamesExport; export = classNames; export as namespace classNames;