Open lucaswerkmeister opened 8 years ago
Can typescript APIs be fully described in terms of Ceylon source?
I thought about this for Dart, but the typechecker supports things like static members and maybe-optional types that are necessary but aren't part of the language.
Hm, that’s a good point. For full support, we’d have to make up fake syntax for these features, then teach the IDE to load them…
Still, some support could be better than no support, I think.
It would be useful to have a tool that, given some compiler model (from a
.car
file or a-model.js
file or whatever), wrote some equivalent Ceylon code for the declarations in that model (eliding the actual code, of course – empty blocks).For one, the IDE currently can’t load
-model.js
files, so unless that’s resolved first, to work with TypeScript modules using the IDE the TypeScript loader will have to create some form of.src
file from which the IDE can load declarations. This tool would use the JS backend to read the-model.js
file and write out files that can then be zipped up into an appropriate.src
file.This will probably be a separate project (using
ceylon.ast
, hopefully), but I’m filing the issue here for now.