jshemas / openGraphScraper

Node.js scraper service for Open Graph Info and More!
MIT License
643 stars 102 forks source link

reuslt.twitterImage is improperly typed as string | undefined #160

Closed alexng353 closed 1 year ago

alexng353 commented 1 year ago

Typescript claims that it's a string, but it can occasionally be successfully casted to an imageObject type

image

image image

jshemas commented 1 year ago

Hello. I've added an twitterImageObject type in open-graph-scraper@5.0.5.

alexng353 commented 1 year ago

Thanks m8. There's also a bug that I'm making a new issue on, causing a segmentation fault while using 'jest' and 'supertest' to test an express.js endpoint. I'll link an example repository for recreating it as well. At this point I've dropped back to 4.11.1, since that version does not include the error I mentioned.

alexng353 commented 1 year ago

162