After digging into json-to-ts it looks like there is support for optional properties using a curious syntax (--? added to the end of the property key). You can see it here.
I tested it with retweeted_status in tweet-template.json & it worked as expected, producing this result:
I can't say I love this method as it requires modifying the raw JSON being returned from Twitter & is more error prone, but it seems better than nothing.
After digging into json-to-ts it looks like there is support for optional properties using a curious syntax (
--?
added to the end of the property key). You can see it here.I tested it with retweeted_status in tweet-template.json & it worked as expected, producing this result:
I can't say I love this method as it requires modifying the raw JSON being returned from Twitter & is more error prone, but it seems better than nothing.
(copied from here)