Skip to content

Commit

Permalink
Merge pull request #2 from thorwebdev/thor/fix-types
Browse files Browse the repository at this point in the history
fix: fix types via inheritance.
  • Loading branch information
ascorbic authored Nov 22, 2022
2 parents b457ead + ecc4e91 commit 85805c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"deno.enable": true,
"deno.unstable": true,
"deno.lint": true,
"deno.importMap": ".netlify/edge-functions-import-map.json",
"editor.defaultFormatter": "denoland.vscode-deno"
}
4 changes: 2 additions & 2 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const loadDynamicAsset = ({ emoji }: { emoji?: EmojiType }) => {
};
};

export class ImageResponse {
export class ImageResponse extends Response {
constructor(element: ReactElement, options: ImageResponseOptions = {}) {
const extendedOptions = Object.assign(
{
Expand Down Expand Up @@ -222,7 +222,7 @@ export class ImageResponse {
},
});

return new Response(result, {
super(result, {
headers: {
"content-type": "image/png",
"cache-control": isDev
Expand Down

0 comments on commit 85805c0

Please sign in to comment.