Minor Changes
-
#117
b94a123Thanks @delucis! - Adds type safety toOGImageRoute. Thepageparameter ingetSlug()andgetImageOptions()is now correctly inferred from the value passed topagesinstead of being typed asany.OGImageRoute({ pages: { example: { title: 'Example Page', description: 'Description of this page shown in smaller text', }, }, getImageOptions: (path, page) => { page; // ^? { title: string; description: string } }, });
⚠️ Potentially breaking change: If you are type checking your code base, you may see type errors if you are accessing
pageingetSlug()orgetImageOptions()in a non-type-safe way and will need to either update that code or add some additional types.