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

Namespaced aliases lost in translation #119

Closed
Schahen opened this issue Sep 26, 2019 · 2 comments
Closed

Namespaced aliases lost in translation #119

Schahen opened this issue Sep 26, 2019 · 2 comments
Labels
compilation-failure kotlin code is generated but this code fails to be compiled

Comments

@Schahen
Copy link
Contributor

Schahen commented Sep 26, 2019

While converting

declare var _: _.StaticInstance;
export = _;

declare module _ {
    type PropertyShorthand = string | number;

    interface StaticInstance {
        fetch<T>(param: _.PropertyShorthand): T[];
    }
}

StaticInstance converts to:

external interface StaticInstance {
    fun <T> fetch(param: `_`.PropertyShorthand): Array<T>
}

While PropertyShorthand is (ha!) lost in translation.

@Schahen Schahen added bug compilation-failure kotlin code is generated but this code fails to be compiled labels Sep 26, 2019
@Schahen
Copy link
Contributor Author

Schahen commented Sep 26, 2019

An other example, quite shameful one as well

declare module a {
  function ping(a: b.AlphaNumeric);
}

declare module b {
  type AlphaNumeric = string | number
}

export = a.ping

Schahen added a commit that referenced this issue Sep 27, 2019
@Schahen
Copy link
Contributor Author

Schahen commented Oct 1, 2019

resolved in 0.0.19

@Schahen Schahen closed this as completed Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compilation-failure kotlin code is generated but this code fails to be compiled
Projects
None yet
Development

No branches or pull requests

1 participant