Skip to content

Add "types" entries to the "exports" property of package.json, to allow consumption from Typescript with the new Node16 module resolution strategy #42

@Duncan3142

Description

@Duncan3142

Is your feature request related to a problem? Please describe.

I'm unable to consume "ava" from Typescript 4.7, when module resolution is set to Node16

Describe the solution you'd like

Add "types" entries to the "exports" property of package.json

Describe alternatives you've considered

None

Additional context

The following should suffice

"exports": {
  ".": {
    "types": "./index.d.ts"
    "import": "./entrypoints/main.mjs",
    "require": "./entrypoints/main.cjs"
  },
  "./eslint-plugin-helper": "./entrypoints/eslint-plugin-helper.cjs",
  "./plugin": {
    "import": "./entrypoints/plugin.mjs",
    "require": "./entrypoints/plugin.cjs"
  }
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions