Typescript: Import aliases have poor quick-info descriptions

Created on 3 Nov 2015  路  10Comments  路  Source: microsoft/TypeScript

image

API Fixed Suggestion VS Code Tracked help wanted

Most helpful comment

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.

All 10 comments

what would you want see more here?

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

image

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.

What about something like

import y
interface y
namespace y

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

any concrete proposals here?

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.

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

@mhegazy nice!

thanks @jwbay !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbondc picture jbondc  路  3Comments

siddjain picture siddjain  路  3Comments

bgrieder picture bgrieder  路  3Comments

zhuravlikjb picture zhuravlikjb  路  3Comments

blendsdk picture blendsdk  路  3Comments