Skip to content

Dotted type in jsdoc is not parsed correctly #16268

@flaviut

Description

@flaviut

TypeScript Version: 2.4.0-dev.20170605
Code

import React from 'react';

/**
 * @param {React.FormEventHandler<Checkbox>} a
 */
function foo(a) {}

Expected behavior:
The language service parses the jsdoc as documented in https://github.com/Microsoft/TypeScript/wiki/JSDoc-support-in-JavaScript

Actual behavior:
[js] '}' expected. at the <. This appears to be a problem with the dotted type, i.e. import React, {FormEventHandler} from react; …{FormEventHandler<Checkbox>} … works fine.

Reproduced using visual studio code (I don't know how to manually launch and use the language service).

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationFixedA PR has been merged for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions