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

Import aliases have poor quick-info descriptions #5515

Closed
DanielRosenwasser opened this issue Nov 3, 2015 · 10 comments · Fixed by #19489
Closed

Import aliases have poor quick-info descriptions #5515

DanielRosenwasser opened this issue Nov 3, 2015 · 10 comments · Fixed by #19489
Labels
API Relates to the public API for TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue

Comments

@DanielRosenwasser
Copy link
Member

image

@DanielRosenwasser DanielRosenwasser added the Bug A bug in TypeScript label Nov 3, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Nov 3, 2015

what would you want see more here?

@DanielRosenwasser
Copy link
Member Author

I'd like to see every entity that y encompasses. For instance, look at the quick info I get on A here:

image

@mhegazy
Copy link
Contributor

mhegazy commented Nov 3, 2015

except that an alias has a different name. so it is confusing to hover over y and get interface A. we used to do that, then added the new import kind.

@DanielRosenwasser
Copy link
Member Author

What about something like

import y
interface y
namespace y

@mhegazy
Copy link
Contributor

mhegazy commented Nov 4, 2015

but there is no interface y, it is really import y (aliasing) interface A / namespace A

@mhegazy
Copy link
Contributor

mhegazy commented Nov 13, 2015

any concrete proposals here?

@mhegazy mhegazy added Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript API Relates to the public API for TypeScript and removed Bug A bug in TypeScript labels Nov 13, 2015
@techird
Copy link

techird commented Jan 7, 2016

In file type.ts, I define an interface Person

/**
 * The type repencent a person
 */
export interface Person {
    name: string,
    age: number
}

In file index.ts where I import Person,

import { Person } from './types';

var techrid: Person; // hover point

when I hover on the hover point (the Person word), I would expect to see below.

import Person

interface Person
The type repencent a person

If I specific an alias like

import { Person as MyPerson } from './types';

I would expect to see below.

import Person as MyPerson

interface Person
The type repencent a person

In simple, just grap the quick info from the origin export point appending to the import quick info.

@mhegazy mhegazy added Help Wanted You can do this and removed Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. labels Jan 7, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Jan 7, 2016

We would be open to a PR here. A possible solution is for Aliases to augment their quick info with that of their target.

@techird
Copy link

techird commented Jan 8, 2016

@mhegazy nice!

@mhegazy
Copy link
Contributor

mhegazy commented Jan 8, 2018

thanks @jwbay !

@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API Relates to the public API for TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants