You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are The Types Wrong lists the issue "Masquerading as ESM" for the regex package.
I guess the issue lies in package exports field, it only lists a single type definition file but an .mjs and a .cjs source for ESM and CJS respectively. Newer TS versions would need two definitions .d.mts and .d.cts. I believe they can generally be identical. There's some edge case import/export syntax only available in .cts files: https://www.typescriptlang.org/docs/handbook/modules/reference.html#export--and-import--require
I haven't tested it, but I believe rewriting the exports field to something like this could work:
Are The Types Wrong lists the issue "Masquerading as ESM" for the
regex
package.I guess the issue lies in package
exports
field, it only lists a single type definition file but an.mjs
and a.cjs
source for ESM and CJS respectively. Newer TS versions would need two definitions.d.mts
and.d.cts
. I believe they can generally be identical. There's some edge case import/export syntax only available in.cts
files:https://www.typescriptlang.org/docs/handbook/modules/reference.html#export--and-import--require
I haven't tested it, but I believe rewriting the
exports
field to something like this could work:The text was updated successfully, but these errors were encountered: