Giter VIP home page Giter VIP logo

Comments (3)

joshtynjala avatar joshtynjala commented on May 23, 2024

Thanks for the bug report. Yeah, dts2as isn't always great at using many TypeScript features together when ActionScript doesn't have them too, like this case with type aliases, unions and string literal types. I've gotten most of them to work alone, but edge cases that combine many features at once tend to break.

from dts2as.

rollerkazike avatar rollerkazike commented on May 23, 2024

You are welcome!

I see... I was thinking that may be the case, but luckily working a little on the d.ts file does the trick, so that's great. In the end with these kind of things, you can always set the type as 'any' and go ahead with that...

Maybe the dts2as tool, as a last resort option if a type cannot be resolved, set it as 'any' and throw a warning in the console? It can even be an option you can specify when running the tool :)

Thanks again Josh for the help!

from dts2as.

joshtynjala avatar joshtynjala commented on May 23, 2024

That's a good idea about falling back to any when the type can't be found (with a warning, of course).

Another thing you can do is specify the -outDir option to have dts2as output uncompiled ActionScript instead of trying to compile the SWC. Then you can make tweaks to the .as files and compile the SWC yourself. It may be easier to tweak the .d.ts files instead of the .as files, though.

from dts2as.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.