
tag allows you to provide a type expression identifying the type of value that a symbol may contain, or the type of value returned by a function. You can also include the parameter's type, enclosed in curly brackets, and a description of the parameter.Īfter above code, VS code's intellisense will work great whenever you try to call sayHello: The tag requires you to specify the name of the parameter you are documenting.


In above example, after you write first line, let foo = 42 it will show you methods of a number:īut what if you assign a JSON, which is going to hold many properties like id, createdOn, etc. Visual Studio Code's intellisense will only work, if it understands the type of your code. Variables in JavaScript are not directly associated with any particular value type, and any variable can be assigned (and re-assigned) values of all types: let foo = 42 // foo is now a numberįoo = true // foo is now a boolean Intellisense in VS Code

JavaScript is a loosely typed and dynamic language.
