Even though native jsdoc format is pretty useful itself compared to some other languages, it still lacks one vital feature - an ability to specify type that references some other var in your code. The plugin adds that feature with the = format, like this:
You can specify type of function argument with @param or declared variable with either @var or @type. You can also reference any var defined in other file with at('FileName.js').varName:
Even though native jsdoc format is pretty useful itself compared to some other languages, it still lacks one vital feature - an ability to specify type that references some other var in your code. The plugin adds that feature with the
=
format, like this:You can specify type of function argument with
@param
or declared variable with either@var
or@type
. You can also reference any var defined in other file withat('FileName.js').varName
:You can type any valid javascript expression after the
=
(for exampleawait
to get type ofT
fromPromise<T>
):