Adding autocompletion and linting in editors and IDEs

Autocompletion features and linting always make it easier to develop plugins.

You can get autocompletion when developing plugins for Adobe XD by using the typescript definitions which can be found on GitHub.

To use it with your IDE, just download the latest release and follow the instructions provided in the repo’s wiki.

Please note that this is open source and updated by the community (i.e. me, for the moment), therefore – while I try to always keep them up to date, I provide no guarantees for it to always be correct and up to date.

Also, if you have any requests, issues or anything, please feel free to open an issue on GitHub or contribute directly. You could also (if there’s any reason not to do it via GitHub) contact me directly (e.g. via email: xdplugins@pabloklaschka.de) since I’m the creator of and currently maintaining the repo :wink:.

Thank you very much in advance for any feedback and/or contributions you might provide :+1:

5 Likes

Hi @pklaschka,
I’m using Brackets. Do you know how can I install your typescript definitions?

Thank you very much!

2 Likes

Hi @PaoloBiagini,

Thank you very much for your message.

I’m sorry to say I haven’t used Brackets before and therefore do not know if and how it is possible to use the typings there. If you find any way to use the typings, please feel free to let me know and I will add instructions to the repo. I also added this as an issue to the backlog (https://github.com/AdobeXD/typings/issues/18), so you can monitor progress there.

I did a quick research and it doesn’t seem like this (using typescript definitions in Brackets) is documented anywhere (you’ll probably need to use some sort of plugin since from what I’ve read, there doesn’t appear to be native support for this). Therefore, I can’t promise any instructions coming soon for now (I will – however – look into it when I have time).

I’m sorry for not being able to provide more help (for now),
Thank you very much,
Happy Coding,
Pablo

2 Likes

Thank you very much @pklaschka,
don’t worry, probably I’m one of the few using Brackets.
Never mind, I settle for that, but if I have news about it I will be happy to share them here!

1 Like

I just updated the typings to (hopefully) match the current state of the APIs. You can find the updated definitions on GitHub.

If you find any inconsistencies, please feel free to open an issue or contact me another way – thank you very much in advance :+1:.

1 Like

And yet again, I’ve updated the typings to match the XD 14 APIs. Compatibility (when it’s not >= v13) will also get shown in the JSDoc.

You can find the latest release on the releases page of the repo.

If you find any inconsistencies, please feel free to open an issue or contact me another way – thank you very much in advance :+1:.

3 Likes

And – I’ve now updated the typings to fit the (documented) changes for XD 15. Since I’ve seen that the update is available today but the xd-15 docs aren’t published yet (except for the matching GitHub branch of the docs), I of course can’t guarantee for them to be 100 % accurate, but since the update was released today, I thought I’d go ahead and update the typings :stuck_out_tongue_winking_eye:

You can find the release at https://github.com/AdobeXD/typings/releases/tag/v15.0.

2 Likes