Comments (3)
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.
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.
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)
- Cannot compile SWC when other d.ts files are referenced, unless they are included in dts2as arguments
- Cannot parse TypeScript enums in d.ts files
- --flexHome and other arguments can't handle ~ for home directory in path
- Error when try to convert pixi.js.d.ts to pixijs.swc HOT 3
- Angular Material/AngularJS conversion issue HOT 9
- Tonejs problem HOT 3
- Errors when generating swc HOT 4
- PIXI SWC issue HOT 3
- dts2as and VSCode HOT 2
- Cannot transform any d.ts file successfully, is there anything wrong? HOT 8
- Parameters with different TS types in function overloads are converted to AS Object instead of a common base type
- ast2ts HOT 1
- Add argument to enable function parameters and properties to be typed as strict interfaces instead of falling back to Object
- Treat all uppercase properties as constants (with setting to disable, if needed)
- asjsc warns about missing classes that appear in lib.d.ts but not in externs HOT 1
- TypeError: Cannot read property 'pos' of undefined HOT 5
- Windows 10: "no such file or directory" and "was unexpected at this time" errors HOT 12
- Fix build on Windows
- Update to TypeScript 1.7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dts2as.