Skip to content
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

Support quick info at function and => locations #19669

Merged
2 commits merged into from
Nov 2, 2017
Merged

Conversation

ghost
Copy link

@ghost ghost commented Nov 1, 2017

Fixes #2736

I think this would be better-looking if we stopped writing (local function) and just used function, although that was apparently intentional at some point and would change a lot of baselines.

@ghost ghost requested a review from armanio123 November 1, 2017 21:20
@@ -489,8 +489,10 @@ namespace ts.SymbolDisplay {
addNewLineIfDisplayPartsExist();
if (symbolKind) {
pushTypePart(symbolKind);
displayParts.push(spacePart());
addFullSymbolName(symbol);
if (!some(symbol.declarations, d => isArrowFunction(d) || (isFunctionExpression(d) || isClassExpression(d)) && !d.name)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(d => !d.name) ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few declarations don't have a name property but will still have a name when written out by the checker.

@mhegazy
Copy link
Contributor

mhegazy commented Nov 1, 2017

Shouldn't there be a change to getQuickInfoAtPoisiton to allow for function keyword?

@ghost ghost force-pushed the quickInfoFunctionKeyword branch from 53b15bb to f98e56d Compare November 2, 2017 20:37
@ghost ghost force-pushed the quickInfoFunctionKeyword branch from f98e56d to 33ace79 Compare November 2, 2017 20:55
@ghost ghost merged commit 01ad4f7 into master Nov 2, 2017
@ghost ghost deleted the quickInfoFunctionKeyword branch November 2, 2017 21:47
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant