Skip to content

Typescript does not allow null for style parameter in rect() #3034

Closed
@bmckilligan

Description

@bmckilligan

when trying to create a clipping rectangle using rect(x, y, w, h, style) with style = null
typescript definition is showing null as an invalid argument option

using rect(x, y, w, h) or rect(x, y, w, h, undefined) does not create the proper clipping rectangle

changing line 722 in jsPDF/types/index.d.ts seams to work
from:
rect(x: number, y: number, w: number, h: number, style?: string): jsPDF;
to:
rect(x: number, y: number, w: number, h: number, style?: string | null ): jsPDF;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions