Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

getJsDocTags does not return @type annotations #13498

Copy link
Copy link

Description

@domoritz
Issue body actions

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 [].

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptSuggestionAn idea for TypeScriptAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.