question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type definitions do not match in version 1.4.1

See original GitHub issue

Using jsPDF version 1.41 (I think the problem also applies to version 1.4.0.) Using @types/jspdf version v1.1.31 (AFAIK, no other version available).

Problem:

The types in v1.4.1 do not match with type definitions in @types/jspdf@1.1.31.

Sample:

const doc = new jsPDF();
console.log(doc.internal.pageSize.width);

Previous 1.4.1/1.4.0 the above code works as expected. Property doc.internal.pageSize.width match with type definitions and exists as a property. All is OK.

In version 1.4.1/1.4.0 the property doc.internal.pageSize.width does not exists and I must use the doc.internal.pageSize.getWidth() method instead. Doing this works but I get an error in the editor (VSCode) due to mismatching type definitions.

How can I solve this? There is an updated version of type definitions?

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
Uzlopakcommented, Sep 11, 2018

What about this stuff?

https://dev.to/_gdelgado/comment/33dd

Using jsDoc instread typed?

I added a huge load of jsDoc to the project with #1944

Secondly, yeah i guess there is a need of a getPageSize-API and setPageSize-API like suggested in #825

0reactions
Andermancommented, Oct 10, 2019

I looked to this tsd-jsdoc But I don’t know how to run this with jspdf

Read more comments on GitHub >

github_iconTop Results From Across the Web

Definitely Not Versioned · Issue #7719 · DefinitelyTyped ...
I'm assuming that this represents the TypeScript version itself. Unfortunately it ends with 1.4.1. Therefore I assumed that TypeScript ...
Read more >
Specifying Typescript Type Definition Versions - Stack Overflow
I am a new to TypeScript and a bit confused. If my version of TypeScript is 1.0.1 (say I'm stuck on VS2012), how...
Read more >
Documentation - TypeScript 1.4
TypeScript 1.3 Release Notes. ... Union types are a powerful way to express a value that can be one of ... 'choose' function...
Read more >
FinCEN Currency Transaction Report (CTR) Electronic Filing ...
FinCEN CTR XML Schema User Guide (Version 1.5 | January 2020) ... "The sum of all subtotal cash in amounts does not equal...
Read more >
Configuring the type properties used for event pattern creation ...
Netcool/Impact uses the database field specified in this property as the default Event Identity when there is no match in the value specified...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found