Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this.doc.getTextDimensions do not return any height under typescript. #2851

Closed
IngoManthey opened this issue Aug 14, 2020 · 1 comment
Closed

Comments

@IngoManthey
Copy link

IngoManthey commented Aug 14, 2020

HI,

my code:

const dim = this.doc.getTextDimensions(strArr, { maxWidth: 170 }); const heigth = Math.ceil(dim.h) - 8;

In Visual Code Studio, the .h is displayed in red.
ng serve create follow error:
ERROR in src/app/invoice/services/invoice-print.service.ts:117:46 - error TS2339: Property 'h' does not exist on type '{ x: number; y: number; }'.

117 const heigth = Math.ceil(dim.h) - 8;

@HackbrettXXX
Copy link
Collaborator

Yes, and I fixed this in #2848. As I commented on the other issue (#2845), you can workaround this issue by adding a @ts-ignore comment to the line until the fix is released. The code will work at runtime, despite the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants