I can't figure out how to create a declaration for a specific npm module. Namely bbcode-to-react.
The main file is indicated as index.js and has only a little code:
'use strict';
var _parser = require('./parser');
var _parser2 = _interopRequireDefault(_parser);
var _tag = require('./tag');
var _tag2 = _interopRequireDefault(_tag);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = new _parser2.default();
module.exports.Parser = _parser2.default;
module.exports.Tag = _tag2.default;
Both './parser' and './tag' contain classes I need.
I can't figure out from the typescript docs, how to declare/export this set-up in the d.ts file. The best I can find related to module.exports is all about exporting a single class or function but I need both the Parser and Tag classes.