3 ms·
How could this be done for JavaScript without any mechanism for signifying the type of object that is expected?
by Rychard 7y ago
How could this be done for JavaScript without any mechanism for signifying the type of object that is expected?
- mikewhy 7y agoJS files can use JSDoc, which typescript handles (when you edit a JS file in VS Code, you're already secretly using typescript).
- jamil7 7y agoIf you're using a third party dependency that has type definitions tsserver / VSCode will pick it up regardless of whether you're writing js or ts.
- Roboprog 7y agoType inference from analyzing data flow. Especially if you avoid making everything global.