Type definitions do not match in version 1.4.1
See original GitHub issueUsing 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:
- Created 5 years ago
- Comments:13
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
I looked to this tsd-jsdoc But I don’t know how to run this with jspdf