Extending a namespace in .d.ts
file vs in .ts
file
#14325
Labels
Question
An issue which isn't directly actionable in code
.d.ts
file vs in .ts
file
#14325
Typescript@2.1.6
Using
"@types/react": "^0.14.41",
and"@types/react-dom": "^0.14.18"
(installed via npm).When I write
in a
customTypings/react-tap-touch.d.ts
file, it seems to cause tsc to report a lot of errors (errorTS2604: JSX element type 'Router' does not have any construct or call signatures
and similar). Looks likereact
namespace is overriden rather than extended.Using the same snippet in a
startup.ts
file works fine (i.e., extendsreact
and doesn't override it).What's the difference between extending a namespace from
.d.ts
vs.ts
file? Shouldn't.d.ts
be the right place to do this sort of thing?The issue is summed up by this comment:
zilverline/react-tap-event-plugin#58 (comment)
The text was updated successfully, but these errors were encountered: