-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
break: include "exports" map w/ "types" conditions (#57)
The non-standard `package.json` field `module` was used. This pointed to a faux ESM file (Uses ESM syntax, but has a `.js` file extension in a package which doesn’t specify `"type": "module"`. ESM support was fixed by using the `.mjs` file extension for the ESM export and defining a proper `exports` field in `package.json. The types reflected a package that has the `module.exports.default` field. This was incorrect. The CommonJS types have now been fixed to use `export =`, which is the correct way to type modules that use `module.exports` assignments. Additional types were added for ESM support.
- Loading branch information
1 parent
4a4eadd
commit 3ec8e9f
Showing
3 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export type ClassValue = ClassArray | ClassDictionary | string | number | null | boolean | undefined; | ||
export type ClassDictionary = Record<string, any>; | ||
export type ClassArray = ClassValue[]; | ||
|
||
export function clsx(...inputs: ClassValue[]): string; | ||
export default clsx; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
export type ClassValue = ClassArray | ClassDictionary | string | number | null | boolean | undefined; | ||
export type ClassDictionary = Record<string, any>; | ||
export type ClassArray = ClassValue[]; | ||
declare namespace clsx { | ||
type ClassValue = ClassArray | ClassDictionary | string | number | null | boolean | undefined; | ||
type ClassDictionary = Record<string, any>; | ||
type ClassArray = ClassValue[]; | ||
function clsx(...inputs: ClassValue[]): string; | ||
} | ||
|
||
export declare function clsx(...inputs: ClassValue[]): string; | ||
export default clsx; | ||
declare function clsx(...inputs: clsx.ClassValue[]): string; | ||
|
||
export = clsx; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters