
In the picture, the description of done(), VSCode informs the type of parameters with a colon error: any or sometimes with question mark and colon user?: any.
What is the difference between them?
I mean, what's the difference between using only colon and using colon with question mark when VSCode presenting types?
The question mark signifies an optional parameter. When calling done, error is a mandatory parameter, that you must always provide. user is optional, so you don't need to provide it when calling.
Here is an example for defining optional parameter.