Skip to content

Commit

Permalink
Remove 'Class' prefix on types, and mappings are non-strict
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Apr 1, 2021
1 parent 9382ce0 commit 6c684f8
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions index.d.ts
Expand Up @@ -8,15 +8,10 @@
// Michal Adamczyk <https://github.com/mradamczyk>
// Marvin Hagemeister <https://github.com/marvinhagemeister>

export type ClassValue = string | number | boolean | undefined | null | ClassDictionary | ClassArray;
export type Value = string | number | boolean | undefined | null;
export type Mapping = { [key: string]: Value };
export type Argument = Value | Mapping | Argument[];

export interface ClassDictionary
{
[id: string]: boolean | undefined | null;
}

export interface ClassArray extends Array<ClassValue> {}

export function classNames(...args: ClassArray): string;
export function classNames(...args: Argument[]): string;

export default classNames;

0 comments on commit 6c684f8

Please sign in to comment.