What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Fix bugs.
What is the current behavior? (You can also link to an open issue here)
1) Fix duplicate Component type
There were two Component declarations, which typescript merged, but one should only contain component metadata and the other contains a full component.
2) Add missing attributes
When I tried to annotate a real API response with this type, typescript complained because there were some unexpected attributes.
3) Make some optional as per real API responses
It also complained because there were some missing attributes.
What is the new behavior (if this is a feature change)?
The above are fixed.
Other information:
To be honest, I'm not sure if other attributes can be optional because this isn't documented in the Figma API docs. This was just enough to fix type errors on my sample API response.
Fix bugs.
1) Fix duplicate Component type
There were two Component declarations, which typescript merged, but one should only contain component metadata and the other contains a full component.
2) Add missing attributes
When I tried to annotate a real API response with this type, typescript complained because there were some unexpected attributes.
3) Make some optional as per real API responses
It also complained because there were some missing attributes.
The above are fixed.
To be honest, I'm not sure if other attributes can be optional because this isn't documented in the Figma API docs. This was just enough to fix type errors on my sample API response.