Hacker News new | ask | show | jobs
by ambulancechaser 2636 days ago
Interesting. Similar to how typescript can be added with a rename from foo.js to foo.ts.
1 comments

even on something with dependencies? i.e., with a few requires or ES2016 imports?
Yes, if your tsconfig is sufficiently permissive it will simply give any imports for which it can't find a type definition the 'any' type and assume that you can do anything you like with them. Obviously this doesn't give you any help from the type checker but it will work fine and you can go back and add typings later when you decide you need them.