Skip to content

Package does not pass AreTheTypesWrong #70

@jakebailey

Description

@jakebailey

See: https://arethetypeswrong.github.io/?p=eslint-plugin-react-refresh%400.4.16

The package is bundled, and ends with:

var src_default = { rules, configs };
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  configs,
  rules
});

This means that the output dts file should actually read export = _default;, not export default _default;, since an export named default does not actually exist at runtime.

I noticed this on DT, which previously held types for this package (but will have to be deleted now that you're doing it): https://github.com/DefinitelyTyped/DefinitelyTyped/actions/runs/12118993180/job/33784693075#step:12:2663

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions