New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick info on 'new' keyword should be the same as that of resolved expression #31180
Comments
(Courtesy of @jonathandturner) |
@DanielRosenwasser , |
Yes you certainly may! This one will be in the language service. Start here in Tests can be found in |
@DanielRosenwasser |
I have started working on this. Will open a PR as soon as I finished it. |
@DanielRosenwasser , /// <reference path='fourslash.ts' />
////class C {
/////**
//// * NOTE: this constructor is private! Please use the factory function
//// */
////private constructor() { }
////static makeC() { new C(); }
////}
////
////new C();
debug.printCurrentQuickInfo(); After that I ran the test as |
I'm not sure since it's been a while and I don't develop in the codebase as much anymore - but you'll have to look for where quick info is resolved for overloads (e.g. what code path is it taking for when you hover on the identifier?). Then, when the quick info target is a |
@DanielRosenwasser , |
@sandersn , ////class Cat {
//// /**
//// * NOTE: this constructor is private! Please use the factory function
//// */
//// private constructor() { }
////
//// static makeCat() { new Cat(); }
////}
////ne/*1*/w C/*2*/at();
goTo.marker('2');
debug.printCurrentQuickInfo();
debug.printErrorList();
goTo.marker('1');
debug.printCurrentQuickInfo();
debug.printErrorList(); for the const { symbolKind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken(cancellationToken, typeChecker =>
SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, getContainerNode(node), node)
); but for the |
@RyanCavanaugh, |
I have opened a PR (#31262). |
Thanks @rpgeeganage! |
Expected: Quick info on
C
andnew
innew C()
should be the same.Actual: no quick info on
new
Why it matters
It'd be nice if hovering over the error at any point could also give you better quick info.
The text was updated successfully, but these errors were encountered: