Skip to content

typeToString for type alias defined in different file does not use the type alias name #17322

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

Closed
ghost opened this issue Jul 20, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 20, 2017

TypeScript Version: nightly (2.5.0-dev.20170712)

Code

a.ts

import { f } from "./b";
f({ x: 1 });

b.ts

export type X = { x: number };
export function f(x: X): void {}

Hover over f.

Expected behavior:

(alias) f(x: X): void

Actual behavior:

(alias) f(x: {
    x: number;
}): void
@ghost
Copy link
Author

ghost commented Jul 20, 2017

We should also just put a limit on how much we're willing to write. I noticed a long pause when hovering over Diagnostics in our codebase, which is a huge object literal, with an equally large inferred type.

This issue 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

No branches or pull requests

0 participants