TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Go-to-definition on `return` statements should jump to the containing function declaration

Open DanielRosenwasser opened this issue 3 years ago • 0 comments

function foo() {
    return /*END*/() => {
        /*START*/return 10;
    }
}

Go to definition on START should jump you up to the containing function.

It should be resilient to questionable placements of return and do nothing, as in the following cases.

/*a*/return;


function foo() {
    class Foo {
       static { /*b*/return; }
    }
}

DanielRosenwasser avatar Oct 19 '22 00:10 DanielRosenwasser