-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Unable to specify options with html2canvas in TypeScript after recent release #1854
Comments
As a workaround you can cast to any: await html2canvas(htmlEl, <any>{
windowWidth: htmlEl.clientWidth,
windowHeight: htmlEl.clientHeight,
scale: 2,
logging: false
}); |
@hakimio thanks, but for time being, I just downgraded the version in my package.json to use rc.1 and the builds are passing! |
My workaround for the time being is to cast the options as const opts: Partial<Options> = {
logging: false,
};
html2canvas(body, opts as Options); |
Can confirm that Angular 7 build is failing with 1.0.0-rc.2. Just resolved this issue for our team. 1.0.0-rc.1 worked for us, but we're playing it safe and went back to our initial version of 1.0.0-alpha.12. Error we received seems to have to do with Error produced:
Code for html2canvas is as follows:
|
I am using html2canvas in an Angular application based on TypeScript. I am unable to specify options with html2canvas since recent release. It expects some
id
property in the options provided.Following is my code:
Error:
Property 'id' is missing in type '{ logging: false }' but required in type 'CloneOptions'
Specifications:
The text was updated successfully, but these errors were encountered: