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

Exporting class/variable/function as type exports it as value too #290

Open
timocov opened this issue Jan 11, 2024 · 1 comment
Open

Exporting class/variable/function as type exports it as value too #290

timocov opened this issue Jan 11, 2024 · 1 comment

Comments

@timocov
Copy link
Owner

timocov commented Jan 11, 2024

Bug report

Input code

class Foobar {}

export function makeFoobar(): Foobar {
	return new Foobar();
}

export { type Foobar };

Expected output

declare class Foobar {
}
export declare function makeFoobar(): Foobar;

export {
	type Foobar,
};

export {};

Actual output

export declare class Foobar {
}
export declare function makeFoobar(): Foobar;

export {};
@timocov
Copy link
Owner Author

timocov commented Jan 12, 2024

Waiting for the resolution on microsoft/TypeScript#57032

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant