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

Exported type aliases are missing #299

Closed
Schahen opened this issue Jun 3, 2020 · 0 comments
Closed

Exported type aliases are missing #299

Schahen opened this issue Jun 3, 2020 · 0 comments
Labels
better-translation Code is translated and even useable, but can be better
Milestone

Comments

@Schahen
Copy link
Contributor

Schahen commented Jun 3, 2020

Following code:

// api.d.ts
export interface A { }
export type B = A;

and

import {A, B} from "./api";

declare class C implements A { }
declare class D implements B { }

is translated to:

// api
external interface A
// app

external open class C : A
external open class D : A

While ideally I would expect to have:

// api
external interface A

typealias B = A
// app

external open class C : A
external open class D : B

I actually should check - there might be some issues with inheriting from aliases but even if there are - as of now we are missing type alias unintentionally - it's just happened to be missed - so it's better to translate typealias and omit it later on if needed.

Also, this is related to #270 (this is how I discovered this one actually)

@Schahen Schahen added the better-translation Code is translated and even useable, but can be better label Jun 3, 2020
@Schahen Schahen added this to the 0.5.1 milestone Jun 3, 2020
Schahen added a commit that referenced this issue Jun 3, 2020
@Schahen Schahen closed this as completed Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better-translation Code is translated and even useable, but can be better
Projects
None yet
Development

No branches or pull requests

1 participant