mathjax / MathJax-src

MathJax source code for version 3 and beyond

Home Page:https://www.mathjax.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[typescript] Missing .d.ts for index.js

artagnon opened this issue · comments

mathjax-full is missing a .d.ts for index.js and a few other pure js files, due to which it cannot be used from a TypeScript script. It might be nice to separate out the .d.ts files into a dedicated @types/mathjax-full package.

First off, there is no index.js file (the default file is es5/node-main.js). Second, the node-main.js is set up for use in server-side node applications, not for building web apps (see the README), and is intended only as a quick way to get started by allowing you to use the browser components in node applications. But for real work in node, the better technique is to to call the MathJax modules directly; again, see the [README](https://github.com/mathjax/MathJax-src#using-mathjax-modules-directly-in-node-applications, which includes a link to the examples for using MathJax in node). For web applications, node-main.js is not appropriate.

Please see mathjax/MathJax#2197 for an extensive discussion of a similar request for .d.ts files.