mirror of
https://github.com/quartz-community/og-image.git
synced 2026-07-22 02:50:23 +00:00
The type was a deliberate narrowing of QuartzPluginData that documents which fields the og-image emitter populates before invoking a user's imageStructure callback (including the plugin-synthesised 'text' field). The old name implied accidental duplication, inviting 'helpful' future refactors that would inline it into QuartzPluginData and silently widen the public API. Rename to SocialImageFileData, export it from the package entry, and add a docstring explaining why it must stay narrow. The type was already visible in the generated .d.ts through ImageOptions, so making the export explicit matches what consumers already see in their IDE. Also adds a test suite (og-image previously had no tests): - SocialImageFileData contract tests locking in the documented shape - imageStructure callback signature compatibility - defaultImage called with populated / minimal / readingTimeText override payloads returns a valid preact VNode |
||
|---|---|---|
| .. | ||
| socialImageFileData.test.ts | ||