-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
microsoft/TypeScript-DOM-lib-generator
#160Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this
Milestone
Description
TypeScript Version: 2.0.3
Code
const textarea = document.createElement('textarea');
textarea.style.resize = 'none';
Expected behavior:
- No warning
Actual behavior:
- Warning:
Property 'resize' does not exist on type 'CSSStyleDeclaration'
To workaround this I have created a new interface extending from CSSStyleDeclaration
which does the trick for now.
interface CSSStyleDeclarationWithResize extends CSSStyleDeclaration {
resize: string
}
const textarea = document.createElement('textarea');
const style: CSSStyleDeclarationWithResize = textarea.style as CSSStyleDeclarationWithResize;
style.resize = 'none';
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this