mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* enable classnames/bind usage without bind * add test for classnames/bind * add classnames/dedupe support * same default export trick for classnames/bind * add me to definition author * add dedupe.d.ts to files
14 lines
576 B
TypeScript
14 lines
576 B
TypeScript
// This is the only way I found to break circular references between ClassArray and ClassValue
|
|
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
|
export interface ClassArray extends Array<ClassValue> {} // tslint:disable-line no-empty-interface
|
|
|
|
export interface ClassDictionary {
|
|
[id: string]: any;
|
|
}
|
|
|
|
export type ClassValue = string | number | ClassDictionary | ClassArray | undefined | null | boolean;
|
|
|
|
export type ClassNamesFn = (...classes: ClassValue[]) => string;
|
|
|
|
export type ClassNamesExport = ClassNamesFn & { default: ClassNamesFn };
|