Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Property 'resize' does not exist on type 'CSSStyleDeclaration' #11589

Copy link
Copy link
@fiznool

Description

@fiznool
Issue body actions

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';
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.