I think this will allow code that uses @external to successfully parse, but the typescript it outputs will be incorrect and potentially disruptive when used in other projects.
For example, this makes @external jQuery generate declare class jQuery {}. If someone includes a def file for jQuery, it will also have declare class jQuery {} which I think will cause an error.
This is why I mention in the readme that I'm not sure what the right behavior for this tag is, and therefore left it unimplemented. I think the only "correct" thing it could do would be to import the external and use the definitions defined elsewhere by the import. However, I don't even think that works for all environments people use this in.
I think this will allow code that uses
@external
to successfully parse, but the typescript it outputs will be incorrect and potentially disruptive when used in other projects.For example, this makes
@external jQuery
generatedeclare class jQuery {}
. If someone includes a def file for jQuery, it will also havedeclare class jQuery {}
which I think will cause an error.This is why I mention in the readme that I'm not sure what the right behavior for this tag is, and therefore left it unimplemented. I think the only "correct" thing it could do would be to import the external and use the definitions defined elsewhere by the import. However, I don't even think that works for all environments people use this in.