Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add export
ImageResponseOptions
(#48418)
Exports `ImageResponseOptions` from `next/server`. ## Rationale Today I do this: ```ts import { ImageResponseOptions } from "next/dist/compiled/@vercel/og/types"; import { ImageResponse } from "next/server"; export const config = { runtime: "edge" }; export const GET = async (req: Request) => { const inter = await getFont({ family: "Inter", weights: [400, 700], }); const options: ImageResponseOptions = { width: 1200, height: 600, fonts: [ { name: "Inter", data: inter[400], weight: 400 }, { name: "Inter", data: inter[700], weight: 700 }, ], }; if (someCond) { return new ImageResponse(<>Some JSX</>, options); } // ... return new ImageResponse(<>Some other JSX</>, options); }; ``` And I never like importing stuff from an internal path such as `dist/compiled/...`.
- Loading branch information