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

Re-export of default exports is not working properly (Star exports) #266

Closed
Schahen opened this issue Apr 23, 2020 · 2 comments
Closed

Re-export of default exports is not working properly (Star exports) #266

Schahen opened this issue Apr 23, 2020 · 2 comments
Labels
unusable-code kotlin code is generated, can be compiled but actually is unusable
Milestone

Comments

@Schahen
Copy link
Contributor

Schahen commented Apr 23, 2020

import ping = require("a");
export = ping;

or even just

export = require("a");

Won't be translated at all. I can add a separate tag for empty translation but technically I'm not sinning agains the truth here when considering this unusable code.

@Schahen Schahen added the unusable-code kotlin code is generated, can be compiled but actually is unusable label Apr 23, 2020
@Schahen Schahen modified the milestones: 0.5.1, 0.5.2 May 29, 2020
@Schahen Schahen modified the milestones: 0.5.2, 0.5.3 Jun 13, 2020
@liorgonnen
Copy link

With the current version of Dukat, it's impossible to generate externals out of the box for three.js since the main (Three.d.ts) file is just a collection of exports.

The Three.d.ts file looks like this:

export * from './polyfills';
export * from './renderers/WebGLMultisampleRenderTarget';
export * from './renderers/WebGLCubeRenderTarget';
export * from './renderers/WebGLRenderTarget';
export * from './renderers/WebGLRenderer';
export * from './renderers/shaders/ShaderLib';
export * from './renderers/shaders/UniformsLib';
export * from './renderers/shaders/UniformsUtils';
// ...More exports...

Running Dukat on this file generates nothing.

@Schahen Schahen modified the milestones: 0.5.3, 0.5.5 Jul 3, 2020
Schahen added a commit that referenced this issue Jul 3, 2020
@Schahen
Copy link
Contributor Author

Schahen commented Jul 3, 2020

I'm splitting this task into to - as of star exports - this is done and will be released in 0.5.5, as of require - this actually needs more investigation.

@Schahen Schahen changed the title Re-export of default exports is not working properly Re-export of default exports is not working properly (Star exports) Jul 3, 2020
@Schahen Schahen closed this as completed Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unusable-code kotlin code is generated, can be compiled but actually is unusable
Projects
None yet
Development

No branches or pull requests

2 participants