-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate types automatically #1
Comments
Also you can have a look on my Figma API extract (written in Haxe), not completed yet, but it could be helpful :) It generates this JSON: https://gist.github.com/neelts/c9a4284b3f1d545070b21d713c2965bc from this JS file: https://www.figma.com/figbuild/symlinks/developers.1c90a7f2b28cad9058ead2a9750af639.min.js |
FYI, I used your TypeScript types to generate a JSON schema, from which I'm generating types and JSON marshaling in C#, Go, Rust, C++, Objective-C, Java, JavaScript, Flow, Swift, Elm, and Ruby: https://github.com/quicktype/figma-types For Flow, TypeScript, and JavaScript, I also generate runtime typechecks that compare the Figma JSON to the TypeScript types: https://github.com/quicktype/figma-types/blob/master/typescript/figma.ts#L2150-L2152 I haven't tried any of it yet, though 😝 |
I wrote all the types out by hand which was some pretty intense type 2 fun.
Would be excellent if someone (at Figma?) could figure out how to generate them automatically.
The text was updated successfully, but these errors were encountered: