Skip to content

does not have any construct or call signatures. #10556

Closed
@moaead

Description

@moaead

TypeScript Version: 1.8.0 / nightly (2.0.0-dev.201xxxxx)

Code

var ElementType = "a";
<ElementType className={className} style={this.props.style}/>

Expected behavior:

create an element with <a>, this is valid on jsx.

Actual behavior:

error TS2604: JSX element type 'ElementType' does not have any construct or call signatures.

Workaround

React.createElement(ElementType, {className: className, style: this.props.style});

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions