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

Property 'lock' does not exist on type 'ScreenOrientation'. #55539

Closed
iscekic opened this issue Aug 28, 2023 · 2 comments
Closed

Property 'lock' does not exist on type 'ScreenOrientation'. #55539

iscekic opened this issue Aug 28, 2023 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@iscekic
Copy link

iscekic commented Aug 28, 2023

πŸ”Ž Search Terms

N/A

πŸ•— Version & Regression Information

  • This changed between versions 5.1.6 and 5.2.2

⏯ Playground Link

https://www.typescriptlang.org/play?#code/O4SwdgJg9sB0DOBjATgU1WWVkgwFwEM8QpMAbKRAawAoAiAB2z2QJDwFoGcBbA5AJ50AlAG4gA

πŸ’» Code

window.screen.orientation.lock("portrait-primary");

πŸ™ Actual behavior

Property 'lock' does not exist on type 'ScreenOrientation'. ts(2339)

Which is wrong because it does exist per MDN (and was also working before the version update): https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/lock

πŸ™‚ Expected behavior

Compiler doesn't complain.

Additional information about the issue

Interestingly enough, unlock is still present on ScreenOrientation and doesn't produce this error.

@MartinJohns
Copy link
Contributor

Duplicate of microsoft/TypeScript-DOM-lib-generator#1615.

@andrewbranch andrewbranch added the Duplicate An existing issue was already created label Aug 28, 2023
@typescript-bot
Copy link
Collaborator

This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@typescript-bot typescript-bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants