I recently developed a straightforward npm module:
lib.js:
var myMath = function(a, b){
//this.sum = a + b;
return a + b;
};
export default myMath;
lib.d.ts:
export var MyMath: (x: number, y: number) => number;
In my package.json file, I included: "types": "lib.d.ts"
While attempting to integrate this module into a .NET Core project with TypeScript and Webpack, I encountered some errors. I was able to use it in JavaScript files, but I'm unsure about how to incorporate it in TypeScript. Could it be an issue with the declaration file?
Here's the specific error message :
mymathts1_1.MyMath is not a function