TypeScript custom declaration files for untyped npm modules

后端 未结 3 543
情深已故
情深已故 2021-01-31 14:05

I am consuming a React component called shiitake from npm into my project where I use TypeScript. That library does not have TypeScript declarations so I thought I would write o

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-31 14:44

    In my experience, a definition file will fail in this way if it has any exports or imports declared outside the module definition. If you use an IDE with auto-import, be warned!

提交回复
热议问题