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
Bug report
Imports are lost when importing esm-like export * from ... modules without default export using commonjs import import a = require( "mod" ) or esm import default import a from "mod"
node_modules/@types/node/repl.d.ts (copy from @types/node@18.11.9)
declare module 'repl'{// some unimportant code(s) have been removedinterfaceReplOptions{// some unimportant code(s) have been removed}// some unimportant code(s) have been removed}declare module 'node:repl'{export*from'repl';}
// Generated by dts-bundle-generator v7.1.0importrepl1= require("node:repl");importrepl2from"node:repl";import*asrepl3from'node:repl';exportinterfaceMyReplOptions1extendsrepl1.ReplOptions{}exportinterfaceMyReplOptions2extendsrepl2.ReplOptions{}exportinterfaceMyReplOptions3extendsrepl3.ReplOptions{}export{};
Or, If this import method fails to generate a definition file normally, the program should have an explicit warning.
Actual output
example.d.ts
// Generated by dts-bundle-generator v7.1.0import*asrepl3from'node:repl';exportinterfaceMyReplOptions1extendsrepl1.ReplOptions{}exportinterfaceMyReplOptions2extendsrepl2.ReplOptions{}exportinterfaceMyReplOptions3extendsrepl3.ReplOptions{}export{};
command output
Compiling input files...
Processing example.ts
Writing example.ts -> example.d.ts
Checking generated files...
example.d.ts(5,41): error TS2833: Cannot find namespace 'repl1'. Did you mean 'repl3'?
example.d.ts(7,41): error TS2833: Cannot find namespace 'repl2'. Did you mean 'repl3'?
Error: Compiled with errors
Additional context
Add any other context about the problem here (CLI options, etc)
typescript 4.9.3 / dts-bundle-generator v7.1.0
The text was updated successfully, but these errors were encountered:
Bug report
Imports are lost when importing esm-like
export * from ...
modules without default export using commonjs importimport a = require( "mod" )
or esm import defaultimport a from "mod"
Input code
example.ts
tsconfig.json
node_modules/@types/node/repl.d.ts (copy from
@types/node
@18.11.9)command
Expected output
example.d.ts
Or, If this import method fails to generate a definition file normally, the program should have an explicit warning.
Actual output
example.d.ts
command output
Additional context
Add any other context about the problem here (CLI options, etc)
typescript 4.9.3 / dts-bundle-generator v7.1.0
The text was updated successfully, but these errors were encountered: