Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Runtypes v7: Incorrect default exportsΒ #498

@KingDarBoja

Description

@KingDarBoja

Hello @yuhr

First of all, awesome work maintaining this library as it has been helpful for quite a while in some work-related projects. So I was doing a random check via Are The Types Wrong? in order to validate if it supported ESM format (which it does πŸš€) in order to try out how tree-shaking works with ESBuild + setting the module mode to node16, however, I noticed there is a warning related to export default:

The resolved types use export default where the JavaScript file appears to use module.exports =. This will cause TypeScript under the node16 module mode to think an extra .default property access is required, but that will likely fail at runtime. These types should use export = instead of export default.

So it seems some improvement could be done regarding this warning.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions