Skip to content

Support signature help for partially-filled-in type arguments f< #24138

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

Merged
3 commits merged into from
May 23, 2018

Conversation

ghost
Copy link

@ghost ghost commented May 15, 2018

Supports signature help at f<, f<T, f<T, U,, etc.
Required some reworking since we no longer always have a CallLikeExpression handy. We now no longer expose as much to completions.ts, making it call a special function getArgumentInfoForCompletions.

@ghost ghost requested a review from sheetalkamat May 15, 2018 20:39
@ghost ghost force-pushed the signatureHelpTypeArguments branch 2 times, most recently from ad5441c to 9e74450 Compare May 15, 2018 20:42
@ghost ghost force-pushed the signatureHelpTypeArguments branch from 9e74450 to c6cc8e7 Compare May 15, 2018 21:04
argumentsSpan: createTextSpan(attributeSpanStart, attributeSpanEnd - attributeSpanStart),
argumentIndex: 0,
argumentCount: 1
};
}

else if (isBinaryExpression(node.parent)) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you please use isPossiblyTypeArgumentPosition instead?

return undefined;
function getCandidateInfo(argumentInfo: ArgumentListInfo, checker: TypeChecker): { readonly candidates: ReadonlyArray<Signature>, readonly resolvedSignature: Signature } | undefined {
const { invocation } = argumentInfo;
if (invocation.kind === InvocationKind.Call) {
Copy link
Member

Choose a reason for hiding this comment

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

what about new expressions?

@ghost
Copy link
Author

ghost commented May 22, 2018

Note that this feature means editors should request signature help on <. CC @amcasey @mjbvz

mjbvz added a commit to microsoft/vscode that referenced this pull request May 22, 2018
@mjbvz
Copy link
Contributor

mjbvz commented May 22, 2018

I've added < as a trigger character in VS Code: microsoft/vscode@3664b7c

should be in the next insiders build

@ghost ghost force-pushed the signatureHelpTypeArguments branch from b089cdb to 208076a Compare May 23, 2018 14:54
@ghost
Copy link
Author

ghost commented May 23, 2018

Don't know why VSTS isn't running tests.

@ghost ghost merged commit fb4caad into master May 23, 2018
@ghost ghost deleted the signatureHelpTypeArguments branch May 23, 2018 15:28
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 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.

2 participants