Do not use `export =` in TypeScript declaration files
TypeScript may start raising a diagnostic when ESM declaration files use export =. This will cause issues for esm.sh. For example: https://esm.sh/@types/[email protected]/index.d.ts serves up a declaration file that has export = santize in it. I think export = needs to be moved away from.
See https://github.com/microsoft/TypeScript/issues/51321#issuecomment-1371438007 for more details.
thanks! i will look into it.
@dsherret should we rename export = santize to export default santize or just remove it?
It should represent the transformed esm code, so I think export = should go to export default? Maybe that doesn't always work easily.
The testing is failed after resolving export = to export default, i will figure out
rename export = or remove it, both break some types, i reverted for now
This diagnostic has now landed in TypeScript 5.0. export = is being denied in ambient declaration files. I'm going to change the typescript source in Deno to temporarily allow it though.