1 | export as namespace Classcat
|
2 |
|
3 | export interface ClassObject {
|
4 | [key: string]: boolean | any
|
5 | }
|
6 |
|
7 | export interface ClassArray extends Array<Class> {}
|
8 |
|
9 | export type Class = string | number | ClassObject | ClassArray
|
10 |
|
11 | /**
|
12 | * Classcat is a unary function (accepts a single argument) expecting an array of elements or an object of keys and returns a string that is the result of joining all elements of the array or object keys.
|
13 | *
|
14 | * If the value associated with a given key is falsey, the key will be ignored.
|
15 | *
|
16 | * @param classes
|
17 | */
|
18 | export default function(classes: Class): string
|
19 |
|
\ | No newline at end of file |