storybook-addon-figma icon indicating copy to clipboard operation
storybook-addon-figma copied to clipboard

Add TypeScript typings

Open JReinhold opened this issue 8 years ago • 2 comments
trafficstars

I've added typings for TypeScript.

They should be pretty self explanatory, but feel free to ask questions if not. They've been tested with our own project that uses this addon with TypeScript. Both exports require a url parameter/prop, and don't allow anything else.

JReinhold avatar Oct 19 '17 19:10 JReinhold

Hey @JReinhold! I've not played around with TS too much yet, and was wondering if you tried this on JS project too? I'm guessing JS projects will just ignore this file, but wanted to be sure. Would you be up for sharing the project that you've added this too? Would be awesome to see how you're using the Figma addon.

hharnisc avatar Oct 23 '17 13:10 hharnisc

Our experiences are that JS just ignores the TS declarations completely, however I actually haven't tested it with this project to be honest. If you want to try it out with JS you can just download the index.d.ts and put in your node_modules/storybook-addon-figma folder at see that it should work perfectly.

I would LOVE to share our current project, however it is one of those internal super duper top secret confidential projects that I unfortunately can't share with anyone. But I'm pretty sure we're gonna use this addon moving forward because it fits perfectly with our workflow, so when we end up working on a less secret project, I'll remember to share it here. 🙂

Let me know if you need anything else, we are really pleased with this!

JReinhold avatar Oct 23 '17 14:10 JReinhold