Closed
Description
declare class Stuff {
/** For more thorough tests, use {@link checkBarIs} */
checkFooLengthIs(len: number): void;
checkFooIs(value: object): void;
}
Currently, this .ts
file produces no errors.
However, if you very-quickly replace checkBarIs
with checkFooIs
in the above example by double-clicking and pasting in the new text, then VS Code will sometimes then make a definitionAndBoundSpan
request. That request will get served, and then the editor will request errors. The errors returned then become nonsensical.
Expected: No errors
Actual:
- Line 2:45-55 - "Cannot find name 'checkFooIs'. Did you mean the instance member 'this.checkFooIs'?"
- Line 3:5-21 - "Cannot find name 'checkFooIs'."
Here's a relevant fourslash test that currently fails.
/// <reference path="./fourslash.ts" />
////declare class Stuff {
//// /** For more thorough tests, use {@link [|checkFooIs|]} */
//// checkFooLengthIs(len: number): void;
////
//// /*checkFooIsDef*/checkFooIs(value: object): void;
////}
const range = test.ranges()[0];
goTo.selectRange(range);
verify.goToDefinitionIs("checkFooIsDef");
verify.noErrors();