Skip to content

Add Screen.orientation #18480

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

Closed
mhegazy opened this issue Sep 14, 2017 · 9 comments
Closed

Add Screen.orientation #18480

mhegazy opened this issue Sep 14, 2017 · 9 comments
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this

Comments

@mhegazy
Copy link
Contributor

mhegazy commented Sep 14, 2017

From @kenchris on September 14, 2017 13:42

[js] Property 'orientation' does not exist on type 'Screen'. Did you mean 'msOrientation'?

Though screen.orientation is what Chrome uses

mat4.rotateZ(this.rotationMatrix, this.rotationMatrix, toRad(window.screen.orientation.angle || 0));

Copied from original issue: microsoft/vscode#34381

@mhegazy
Copy link
Contributor Author

mhegazy commented Sep 14, 2017

@mhegazy
Copy link
Contributor Author

mhegazy commented Sep 14, 2017

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.

@mhegazy mhegazy added Help Wanted You can do this Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Sep 14, 2017
@mhegazy mhegazy added this to the Community milestone Sep 14, 2017
@kenchris
Copy link

PR here: DefinitelyTyped/DefinitelyTyped#19779

@saschanaz
Copy link
Contributor

👍 but I think it can be on TSJS-lib-generator itself.

@neo
Copy link

neo commented Oct 31, 2017

I think it's because it's still a draft.

@saschanaz
Copy link
Contributor

lib.d.ts recently added several new types which are still in Working Draft status, I think the policy has been slightly changed in undocumented way.

@mhegazy
Copy link
Contributor Author

mhegazy commented Nov 1, 2017

We have found it hard for users to add the types in DT then include them later on in the default library. generates a lot of churn when we include them in the library.

For a north star, we should break up the dom into features, and let ppl opt-in experimental parts, and only include standards by default. this would be enabled by we library references.

@martinlindhe
Copy link

screen.orientation was merged in DefinitelyTyped/DefinitelyTyped@acd15e6,
what is still needed to get this into typescript?

[tsl] ERROR in /Users/m/dev/js/haloba/src/index.ts(36,65)
      TS2551: Property 'orientation' does not exist on type 'Screen'. Did you mean 'msOrientation'?
$ npx tsc -v
Version 2.9.1

@saschanaz
Copy link
Contributor

saschanaz commented Jun 7, 2018

Both Firefox and Chrome have implemented the standard screen.orientation so IMO it can be in TS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

5 participants