Skip to content

Commit

Permalink
Merge pull request #196 from xobotyi/types-definition-improvements
Browse files Browse the repository at this point in the history
Types definition improvements
  • Loading branch information
dcousens committed Apr 1, 2021
2 parents 33363a4 + d85b18a commit c866e9b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
9 changes: 5 additions & 4 deletions bind.d.ts
@@ -1,9 +1,10 @@
import * as base from './index';

interface IClassNamesBind {
bind: (styles: any) => typeof base;
export interface IClassNamesBind
{
bind: (styles: any) => typeof base
}

declare var classNames: IClassNamesBind;
export const classNames: IClassNamesBind;

export = classNames;
export default classNames;
1 change: 1 addition & 0 deletions dedupe.d.ts
@@ -0,0 +1 @@
export * from "./index";
15 changes: 6 additions & 9 deletions index.d.ts
Expand Up @@ -8,18 +8,15 @@
// Michal Adamczyk <https://github.com/mradamczyk>
// Marvin Hagemeister <https://github.com/marvinhagemeister>

export type ClassValue = string | number | ClassDictionary | ClassArray | undefined | null | false;
export type ClassValue = string | number | ClassDictionary | ClassArray | undefined | null | boolean;

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

export interface ClassArray extends Array<ClassValue> { }
export interface ClassArray extends Array<ClassValue> {}

interface ClassNamesFn {
(...classes: ClassValue[]): string;
}

declare var classNames: ClassNamesFn;
export function classNames(...args: ClassArray): string;

export default classNames
export default classNames;

0 comments on commit c866e9b

Please sign in to comment.