I will try to start with an example that works.
If I want to refer or get code intellisense from a lib a an arbitrary js file that use global I can simply use the /// (triple dash). Like in <reference path="../jquery.js"/> now I can see all types as if it is a global.
I am outputting umd and es. either way would be fine.
For example I have a umd/es build that exports two functions: 'addData' 'getData' How can I have a reference to those from an file without importing the actual lib? same as we can do with the ///<reference for JQuery.
Thanks
for anyone wondering the same.
You can define your own d.ts files and put the file in your package.json. In my case I created a file index.d.ts in the src folder which I also copy to the dist when building.
and in the package.json:
"types": "./path/index.d.ts"