def file for object export and types

前端 未结 2 1404
花落未央
花落未央 2021-01-20 10:04

Alright, so we have a Node module string-similarity who exports two functions like this (see: https://github.com/aceakash/string-similarity/blob/master/compare-

2条回答
  •  逝去的感伤
    2021-01-20 10:46

    It looks like the export { ... } line is limiting the exports. (I was unaware that it is possible to do that in a declare module block!) If I delete that line, then by default everything is exported and I'm able to access the types.

提交回复
热议问题