I have a file called model-parser.js
it contains:
var _ = require('lodash');
function getTypes(vitalsModel) {
var vitals = _.get(vitalsModel, 'vitals');
var rows = [];
_.forEach(vitals, function (vital) {
rows.unshift(Object.keys(vital));
});
return rows;
}
module.exports.getTypes = getTypes;
I want to use the above file in a typescript file. What is the correct syntax?