_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_
Documentation in https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation
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.
:+1: but I think it can be on TSJS-lib-generator itself.
I think it's because it's still a draft.
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.
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.
screen.orientation was merged in https://github.com/DefinitelyTyped/DefinitelyTyped/commit/acd15e6e6a1dc1e3cd49209ed8862acf2d51aa46,
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
Both Firefox and Chrome have implemented the standard screen.orientation so IMO it can be in TS.
Most helpful comment
Both Firefox and Chrome have implemented the standard
screen.orientationso IMO it can be in TS.