From cf7318069e63170e160a36602359fc8cbc3386c2 Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Fri, 19 Jan 2024 11:52:25 +0100 Subject: [PATCH] fix: props unnecessarily required in LinearGradient and RadialGradient in TypeScript (#2519) fix: fix props unnecessarily required in LinearGradient and RadialGradient in TypeScript --- .changeset/pretty-moons-hang.md | 5 +++++ packages/renderer/index.d.ts | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 .changeset/pretty-moons-hang.md diff --git a/.changeset/pretty-moons-hang.md b/.changeset/pretty-moons-hang.md new file mode 100644 index 000000000..3f846a9c3 --- /dev/null +++ b/.changeset/pretty-moons-hang.md @@ -0,0 +1,5 @@ +--- +'@react-pdf/renderer': patch +--- + +Fix props unnecessarily required in LinearGradient and RadialGradient in TypeScript diff --git a/packages/renderer/index.d.ts b/packages/renderer/index.d.ts index 5e5a3539d..54618d476 100644 --- a/packages/renderer/index.d.ts +++ b/packages/renderer/index.d.ts @@ -401,10 +401,10 @@ declare namespace ReactPDF { interface LinearGradientProps { id: string; - x1: string | number; - x2: string | number; - y1: string | number; - y2: string | number; + x1?: string | number; + x2?: string | number; + y1?: string | number; + y2?: string | number; } /** @@ -416,11 +416,11 @@ declare namespace ReactPDF { interface RadialGradientProps { id: string; - cx: string | number; - cy: string | number; - fr: string | number; - fx: string | number; - fy: string | number; + cx?: string | number; + cy?: string | number; + fr?: string | number; + fx?: string | number; + fy?: string | number; } /**