diff --git a/types/pdfkit/index.d.ts b/types/pdfkit/index.d.ts index f4cfd7b01326d2..6b9255fcd6aa54 100644 --- a/types/pdfkit/index.d.ts +++ b/types/pdfkit/index.d.ts @@ -383,7 +383,7 @@ declare namespace PDFKit.Mixins { cover?: [number, number] | undefined; align?: "center" | "right" | undefined; valign?: "center" | "bottom" | undefined; - link?: AnnotationOption | undefined; + link?: string | AnnotationOption | undefined; goTo?: AnnotationOption | undefined; destination?: string | undefined; } diff --git a/types/pdfkit/pdfkit-tests.ts b/types/pdfkit/pdfkit-tests.ts index 249427199b6615..fc178f1ffb7386 100644 --- a/types/pdfkit/pdfkit-tests.ts +++ b/types/pdfkit/pdfkit-tests.ts @@ -235,6 +235,11 @@ doc.image("path/to/image.png", { valign: "center", }); +doc.image("path/to/image.png", { + fit: [250, 300], + link: "http://google.com/", +}); + doc.image("path/to/image.png", { cover: [250, 300], });