TypeScript Version: 2.0.3
Code
consttextarea=document.createElement('textarea');textarea.style.resize='none';Expected behavior:
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.
interfaceCSSStyleDeclarationWithResizeextendsCSSStyleDeclaration{resize: string}consttextarea=document.createElement('textarea');conststyle: CSSStyleDeclarationWithResize=textarea.styleasCSSStyleDeclarationWithResize;style.resize='none';
TypeScript Version: 2.0.3
Code
Expected behavior:
Actual behavior:
Property 'resize' does not exist on type 'CSSStyleDeclaration'To workaround this I have created a new interface extending from
CSSStyleDeclarationwhich does the trick for now.