Reputation: 23
I hava write some code write in vscode like:
function sum(a:number, b:number) {
return a + b
}
Meanwhile, vscode give the user some tips which contains Type inference of this function return value.
How does vscode get that auto type inference result, is there some lib or typescript API can get result?
Upvotes: 2
Views: 496
Reputation: 33091
Your VS code has TypeScript language server.
You can find it in the bottom right corner
Here you can find more information about language servers in VS Code
Upvotes: 1