feat: Better detection for declaration files defining a module
feat: Better detection for declaration files defining a module

Might help with #1430

TypeStrong/typedoc,sebastian-lenz/typedoc,sebastian-lenz/typedoc,sebastian-lenz/typedoc,TypeStrong/typedoc,TypeStrong/typedoc