Skip to content

TypeScript error: A tuple type element list cannot be empty. #2883

Closed
@Xenoage

Description

@Xenoage
  1. Installed jspdf in package.json, "jspdf": "^2.1.0"
  2. When compiling my project with typescript, I get the following error:
[app-scripts] typescript: .../App/node_modules/jspdf/types/index.d.ts, line: 1334 
[app-scripts] A tuple type element list cannot be empty.
  1. Can be fixed by adding "any" before the "[]" type at this position
export interface jsPDFAPI {
  events: any[];   // any[] instead of just []
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions