This is an example on how to type (with TypeScript) Node.js functions that uses module.exports
.
*.js
has the module code written in JavaScript*.d.ts
has the module types*.usage.ts
has the JavaScript module usage in TypeScript
An example on how to type a module with a single function (the default
one) without having the export default ...
syntax on its .d.ts
file.
An example on how to type a module with multiple functions.