-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Why Window.print() is removed? #22917
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
Comments
Commit with changes 67c7b36 |
Issue is present in 2.8.0 also. The commit also removes functions that exists in standard. It would be a good idea to redo a full code review on this one. |
PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes. |
git under windows produces unpredictable amount of changes, sorry for so many commits. I need to strip changelog to single line |
Thanks. Sorry I don,t read carefully instriction, that describe separate process for 2 files |
Also methods
start failing to compile: |
@evil-shrike please file a new ticket for that one and will get it fixed. |
yes. the fix is scheduled to be released in 2.8.2 |
Thanks @mhegazy ! |
Thanks @mhegazy |
@ps04639 You are wrong If you think that author of issue does not read TS docs |
(window as any).print(); looks to get around the issue but is still not great as when it creates the js file it resolves to window.print() I am working on the latest available TypeScript via Nuget and the issue is still present today |
@simonprice33 What wrong in you answer, and what you expect? |
@simonprice33 I believe at the time of posting this, the latest TS version is 2.8.3. If you are using VSCode (currently ships/updates with 2.8.1) - you can update the TS version to the latest with the command "npm install -g [email protected]". Follow the voted answer here for more information: Stack Overflow - TS Version |
I'm using ts 2.9.1 and still getting this error. Edit: Intellij is using 2.8.1 internally, which is causing the error. I don't see any way to change which version of typescript it is using internally. I've even told it to use the typescript under node_modules (which is 2.9.1) but the tab on IntelliJ still says "TypeScript 2.8.1". That said, I am NOT having this issue in 2.9.1 |
I am using this code snippet to print my PowerBI embedded report using Angular7 and getting following error. let report = powerbi.get(reportContainer); //Trigger the print dialog for your browser. Error : [ts] property 'print' does not exist on type 'Embed' |
@ChamilaMaddumage try |
TypeScript Version: 2.8.1
Search Terms:
Code
Expected behavior: No errors.
Actual behavior: TypeScript error missing property print in Window
Playground Link: https://www.typescriptlang.org/play/index.html#src=window.print()
Related Issues:
The text was updated successfully, but these errors were encountered: