Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

JSDoc in interface with @ symbol causes node.getStart() to throw exception #164

Closed
@soda0289

Description

@soda0289

TypeScript: master
typescript-eslint-parser: ts-2.1
Eslint: 3.15

interface Test {
    /**
     * Comment Line 1
     * @whatever bar 
     */
    foo(bar);
}

What did you expect to happen?
It should parse

What happened?
Exception from typescript when calling node.start();

TypeError: Cannot read property 'text' of undefined
    at Object.getTokenPosOfNode (/home/reyad/Workspace/typescript-eslint-parser/node_modules/typescript/lib/typescript.js:6807:71)
    at TokenObject.TokenOrIdentifierObject.getStart (/home/reyad/Workspace/typescript-eslint-parser/node_modules/typescript/lib/typescript.js:81993:23)
    at convert (/home/reyad/Workspace/typescript-eslint-parser/lib/ast-converter.js:490:30)
    at convertChild (/home/reyad/Workspace/typescript-eslint-parser/lib/ast-converter.js:517:20)
    at /home/reyad/Workspace/typescript-eslint-parser/lib/ast-converter.js:699:39
    at Array.forEach (native)
    at deeplyCopy (/home/reyad/Workspace/typescript-eslint-parser/lib/ast-converter.js:692:16)
    at convert (/home/reyad/Workspace/typescript-eslint-parser/lib/ast-converter.js:2043:17)
    at convertChild (/home/reyad/Workspace/typescript-eslint-parser/lib/ast-converter.js:517:20)
    at Array.map (native)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions