Skip to content

Find-all-references for @typedef only works for function immediately below it #16688

@ghost

Description

TypeScript Version: nightly (2.5.0-dev.20170621)

Code

/// <reference path='fourslash.ts'/>

// @allowJs: true
// @checkJs: true
// @ts-check

// @Filename: /a.js
/////** @typedef {{}} [|T|] */
////
/////**
//// * @return {[|T|]}
//// */
////function f(obj) { return {}; }
////
/////**
//// * @return {[|T|]}
//// */
////function f2(obj) { return {}; }

const [r0, r1, r2] = test.ranges();
verify.referenceGroups(r0, []);

Expected behavior:

All ranges are references.

Actual behavior:

Only first 2 ranges are references.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions