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

Symbols for default exports are not printed correctly #19428

Closed
weswigham opened this issue Oct 23, 2017 · 0 comments
Closed

Symbols for default exports are not printed correctly #19428

weswigham opened this issue Oct 23, 2017 · 0 comments
Labels
Bug A bug in TypeScript Domain: Declaration Emit The issue relates to the emission of d.ts files Fixed A PR has been merged for this issue

Comments

@weswigham
Copy link
Member

weswigham commented Oct 23, 2017

TypeScript Version: 2.6.0-dev.201xxxxx

Code
Initially, this was visible in our type baselines for an internal project, however I have a minimal sample here:

// @declaration: true
// @filename: component.ts
class Foo {}
export default Foo;

// @filename: test.ts
import * as Component from "./component";
export default Component.default;

Expected behavior:

// component.d.ts
declare class Foo {
}
export default Foo;
// test.d.ts
import * as Component from "./component";
declare const _default: typeof Component.default;
export default _default;

Actual behavior:

// component.d.ts
declare class Foo {
}
export default Foo;
// test.d.ts
import * as Component from "./component";
declare const _default: typeof Component.Foo;
export default _default;

Mentioned this to @Andy-MS the other day, since it looks like this behavior appeared awhile ago; I've bisected, and the issue first appears in 71f8852 (so a result of #18616), @Andy-MS care to take a look?

@ghost ghost self-assigned this Oct 23, 2017
@weswigham weswigham added the Bug A bug in TypeScript label Oct 23, 2017
@mhegazy mhegazy added the Domain: Declaration Emit The issue relates to the emission of d.ts files label Oct 23, 2017
@mhegazy mhegazy added this to the TypeScript 2.7 milestone Oct 23, 2017
@ghost ghost closed this as completed in #19471 Oct 30, 2017
@ghost ghost added the Fixed A PR has been merged for this issue label Oct 30, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: Declaration Emit The issue relates to the emission of d.ts files Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants