index.d.ts 958 B

1234567891011121314151617181920212223242526272829303132
  1. // LICENSE is MIT
  2. //
  3. // Copyright (c) 2018
  4. // Dave Keen <http://www.keendevelopment.ch>
  5. // Adi Dahiya <https://github.com/adidahiya>
  6. // Jason Killian <https://github.com/JKillian>
  7. // Sean Kelley <https://github.com/seansfkelley>
  8. // Michal Adamczyk <https://github.com/mradamczyk>
  9. // Marvin Hagemeister <https://github.com/marvinhagemeister>
  10. declare namespace classNames {
  11. type Value = string | number | boolean | undefined | null;
  12. type Mapping = Record<string, any>;
  13. interface ArgumentArray extends Array<Argument> {}
  14. interface ReadonlyArgumentArray extends ReadonlyArray<Argument> {}
  15. type Argument = Value | Mapping | ArgumentArray | ReadonlyArgumentArray;
  16. }
  17. interface ClassNames {
  18. (...args: classNames.ArgumentArray): string;
  19. default: ClassNames;
  20. }
  21. /**
  22. * A simple JavaScript utility for conditionally joining classNames together.
  23. */
  24. declare const classNames: ClassNames;
  25. export as namespace classNames;
  26. export = classNames;