From 20ed9c91ed8d783ee7b07add76d9ceee4d818d1e Mon Sep 17 00:00:00 2001 From: Lukas Hollaender Date: Mon, 23 Dec 2019 16:08:40 +0100 Subject: [PATCH] some improvements to typings file #27 --- types/index.d.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index ff6110284..ec4d83412 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -637,10 +637,10 @@ declare module "jspdf-yworks" { discardPath(): jsPDF; close(): jsPDF; stroke(): jsPDF; - fill(pattern: PatternData): jsPDF; - fillEvenOdd(pattern: PatternData): jsPDF; - fillStroke(pattern: PatternData): jsPDF; - fillStrokeEvenOdd(pattern: PatternData): jsPDF; + fill(pattern?: PatternData): jsPDF; + fillEvenOdd(pattern?: PatternData): jsPDF; + fillStroke(pattern?: PatternData): jsPDF; + fillStrokeEvenOdd(pattern?: PatternData): jsPDF; moveTo(x: number, y: number): jsPDF; lineTo(x: number, y: number): jsPDF; curveTo( @@ -1187,6 +1187,9 @@ declare module "jspdf-yworks" { addShadingPattern(key: string, pattern: ShadingPattern): jsPDF; beginTilingPattern(pattern: TilingPattern): void; endTilingPattern(key: string, pattern: TilingPattern): void; + + static API: jsPDFAPI; + static version: string; } export interface GState { @@ -1251,10 +1254,5 @@ declare module "jspdf-yworks" { events: []; } - namespace jsPDF { - const API: jsPDFAPI; - const version: string; - } - export default jsPDF; }