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

signature help of tagged template doesn't show instantiated signature #23716

Closed
ajafff opened this issue Apr 26, 2018 · 4 comments · Fixed by #38821
Closed

signature help of tagged template doesn't show instantiated signature #23716

ajafff opened this issue Apr 26, 2018 · 4 comments · Fixed by #38821
Labels
Bug A bug in TypeScript Domain: Quick Info e.g. hover text, tool-tips, and tooltips. Fixed A PR has been merged for this issue

Comments

@ajafff
Copy link
Contributor

ajafff commented Apr 26, 2018

TypeScript Version: 2.9.0-dev.20180426

Search Terms:

Code

declare function tag<T>(string: TemplateStringsArray, ...values: T[]): void;

tag``;
tag`${1}`;
tag<number>``;

Expected behavior:

the following signature help when hovering over tag:

  • function tag<{}>(string: TemplateStringsArray, ...values: {}[]): void
  • function tag<number>(string: TemplateStringsArray, ...values: number[]): void
  • function tag<number>(string: TemplateStringsArray, ...values: number[]): void

Actual behavior:

Signature help shows function tag<T>(string: TemplateStringsArray, ...values: T[]): void in all cases.

Signature help works as expected when calling tag directly using a CallExpression.

Playground Link: https://agentcooper.github.io/typescript-play/#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXwygHMAeAFQD4AKAZwxi1SIC54yQBbAB2gxAGV6jIjQCCMGFACeAGngA6RQDcoEZCBqsyAbQC6ASlZKcWYAG4AUBcJEABrcs3bAEgDeARgC+D68RKpkDgAjEBgKezMgA

Related Issues:
#22873 same issue for JSX elements
#23492 PR for JSX elements

@mhegazy
Copy link
Contributor

mhegazy commented Apr 26, 2018

@DanielRosenwasser wanna take a look.

@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.8.0 milestone Oct 28, 2019
@DanielRosenwasser DanielRosenwasser added Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this and removed Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this labels Jan 31, 2020
@DanielRosenwasser
Copy link
Member

Funny thing I found was that

(foo)()

doesn't instantiate foo in quick info either, but maybe who cares

@DanielRosenwasser
Copy link
Member

lol at Daniel from 4 months ago

@DanielRosenwasser DanielRosenwasser added Domain: Quick Info e.g. hover text, tool-tips, and tooltips. Fixed A PR has been merged for this issue labels May 29, 2020
@DanielRosenwasser DanielRosenwasser removed their assignment May 29, 2020
@DanielRosenwasser
Copy link
Member

Thanks @a-tarasyuk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Quick Info e.g. hover text, tool-tips, and tooltips. Fixed A PR has been merged for this issue
Projects
None yet
4 participants