-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
The types update in 3.1.0 appears to have caused an issue when importing and using Anvil in a typescript project, at least when using ESM.
In 3.1.0 (but not 3.0.1), typescript appears to think Anvil is a namespace, and doesn't recognize it as a class.

This expression is not constructable.
Type 'typeof import("file:///node_modules/@anvilco/anvil/types/src/index")' has no construct signatures.
The issue appears to occur because of this change in index.d.ts from export = Anvil to export default Anvil. Manually changing that single line back appears to fix the type error.
I'm not totally sure why that change would cause this issue, or what the implications of it are. Only that it does seem to be the culprit!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels