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
Set the output extension to mjs or cjs, enable outputting declarations and enable addRelativeDeclarationExtensions
Have a file which imports from another file
Build and review the definitions
Describe the bug
When compiling a .ts file to .mjs or .cjs, the declaration for the file should be .d.mts or .d.cts accordingly. Additionally, when the declarations include imports with extensions (required for node16), the extension also needs to match. It should be .js in .d.ts files, .cjs in .d.cts files and .mjs in .d.mts files.
Right now the feature just looks at the input file. Typescript would compile a .mts file to .mjs, but since mlly also allows explicitly defining the output extension, it should use that option as the source of truth here as well.