I am writing a typescript to JSON schema converter and use the typescript compiler to find out the types and comments of a typescript program. I am using getJsDocTags to get annotations and would like to read the @type annotation.
TypeScript Version: 2.1.1
Code
/** @TJStype integer */
const integer: number = 1;
and
/** @type integer */
const integer: number = 1;
For the symbol integer, I am calling symbol.getJsDocTags().
Expected behavior:
I'd expect to the type jsdoc annotation. In other words, I expect the call to return [{ name: 'type', text: 'integer' }].
I understand that integer is not a valid js type but this behavior is surprising nonetheless.
Actual behavior:
It is missing. I get am empty array [].
I am writing a typescript to JSON schema converter and use the typescript compiler to find out the types and comments of a typescript program. I am using
getJsDocTagsto get annotations and would like to read the@typeannotation.TypeScript Version: 2.1.1
Code
and
For the symbol
integer, I am callingsymbol.getJsDocTags().Expected behavior:
I'd expect to the type jsdoc annotation. In other words, I expect the call to return
[{ name: 'type', text: 'integer' }].I understand that
integeris not a valid js type but this behavior is surprising nonetheless.Actual behavior:
It is missing. I get am empty array
[].