Closed Stefaans closed 2 years ago
Can you make a pull request that does this, please? I don't use TypeScript so don't know what needs to be done or how to test this.
Thank you Christian. I have submitted a pull request.
The solution was simpler than I expected. It was a simple case of specifying the types definition file in packages.json, and microbundle took care of the rest. The asciimath2tex.d.ts file that microbundle generates is bit more verbose than necessary, but good enough because it contains the essential definitions for the AsciiMathParser class and its parser method.
I was not familiar with microbundle until today. Learning something new every day :)
Stephen
fixed by #19
To use asciimath2tex in a TypeScript project, we need type definitions. The following works for me and may be a solution for you too:
In packages.json, specify the type definitions file:
Add file type.d.ts:
With the type definitions in place, I can do: