diff --git a/src/index.ts b/src/index.ts index f55d276..0e01fa6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,26 +21,26 @@ export { classNaming } -function classNaming( - classNames: ClassNamesMap +function classNaming( + classNames: ClassNamesMap ): ClassName; -function classNaming( +function classNaming( className: undefined|string, - classNames: ClassNamesMap + classNames: ClassNamesMap ): ClassName; function classNaming(...args: any[]) { return _classNaming(args.pop(), args.pop()) } -function _classNaming( - classNames: ClassNamesMap, +function _classNaming( + classNames: ClassNamesMap, className: undefined|string ): ClassName { const keys = $keys(classNames) , {length} = keys for (let i = length; i--;) { - const key = keys[i] as C + const key = keys[i] , value = classNames[key] if (typeof value === "string")