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

error TS2339: Property 'userSelect' does not exist on type 'CSSStyleDeclaration' #13506

Closed
martinlindhe opened this issue Jan 16, 2017 · 3 comments
Assignees
Labels
Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript

Comments

@martinlindhe
Copy link

TypeScript Version: 2.1.5

Code

const el = document.createElement("div");
el.style.userSelect = "none"; // error here, property dont exist

Expected behavior:
since the user-select css property is now unprefixed, it would be good to be able to set it!

Actual behavior:
tsc compile error: error TS2339: Property 'userSelect' does not exist on type 'CSSStyleDeclaration'.

More
According to caniuse.com, unprefixed user-select is available in IE11, Edge, Chrome and Firefox

@mhegazy mhegazy added Suggestion An idea for TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this labels Jan 16, 2017
@mhegazy mhegazy modified the milestones: TypeScript 2.2, Community Jan 16, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Jan 16, 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.

@micopc
Copy link

micopc commented Jan 18, 2017

Hi, I wanted to work on this but I found out that the code for this is located on dom.generated.d.ts which according to the CONTRIBUTING.md needs to be modified on https://github.com/Microsoft/TSJS-lib-generator. Am i correct or is there something I'm missing?

@mhegazy
Copy link
Contributor

mhegazy commented Jan 18, 2017

you are correct. the changes need to be made to https://github.com/Microsoft/TSJS-lib-generator, we periodically port the changes back to this repo.

@mhegazy mhegazy self-assigned this Jan 20, 2017
@mhegazy mhegazy modified the milestones: TypeScript 2.2, Community Jan 20, 2017
@mhegazy mhegazy added the Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet label Jan 20, 2017
@mhegazy mhegazy reopened this Jan 20, 2017
@zhengbli zhengbli added Fixed A PR has been merged for this issue and removed Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet labels Feb 3, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants