Typescript type definition file for desktop IDEs?

A typescript definition file is basically an interface or .h file. Visual Studio Code can read it to give suggestions, code completion, etc. A user could write their code in any form of JS (vanilla, ES6, typescript, coffee script, etc). It would obviously have to be compiled to a form Scriptable can then understand. This is the best explanation I’ve found for what it is and why it’s helpful.

EDIT: Looking at Tern it seems like it’s a very similar concept to what you already have.