Are typescript type definitions required?

前端 未结 1 1194
时光取名叫无心
时光取名叫无心 2020-12-31 23:55

My understanding of typescript definition files is that they are used to provide tooling support and are not required to compile typescript.

However given the follow

相关标签:
1条回答
  • 2021-01-01 00:16

    It appears that the definition files are required, is this always the case?

    No. If the module does it properly using the typings property it would just work. More: https://basarat.gitbooks.io/typescript/content/docs/quick/nodejs.html

    The rx npm package includes the definition files. Can typescript automatically search the node modules folder to find them without me having to explicitly reference them?

    Only if they have typings setup properly ... which they don't.

    0 讨论(0)
提交回复
热议问题