Closed NoUJoe closed 2 years ago
Hi, Many endpoints behave like this. I've noticed this after first release of the lib (because Twitter do not document it). Making data property optional is a major breaking change and can be painful in 95% of use-cases, so it's untouched for now.
Appreciate the explanation. I'll just make sure to always check the data property to see if it's undefined
The "data" field on StreamingV2GetRulesResult isn't defined as optional, however, if you have no rules set (therefore no rules returned in response) then the data field is undefined. Not sure if the type definition is wrong or if an empty array should be returned when there's no rules.