mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Refactor classnames.d.ts to allow usage in non-external modules
This commit is contained in:
Vendored
+8
-3
@@ -1,13 +1,18 @@
|
||||
// Type definitions for classnames
|
||||
// Project: https://github.com/JedWatson/classnames
|
||||
// Definitions by: Dave Keen <http://www.keendevelopment.ch>
|
||||
// Definitions by: Dave Keen <http://www.keendevelopment.ch>, Adi Dahiya <https://github.com/adidahiya>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface ClassDictionary {
|
||||
[id: string]: boolean;
|
||||
}
|
||||
|
||||
interface ClassNamesFn {
|
||||
(...classes: (string | ClassDictionary)[]): string;
|
||||
}
|
||||
|
||||
declare var classNames: ClassNamesFn;
|
||||
|
||||
declare module "classnames" {
|
||||
function classNames(...classes: (string|ClassDictionary)[]): string;
|
||||
export = classNames
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user