Skip to content

Error TS2346 when importing React components written in JavaScript  #15375

@mohsen1

Description

@mohsen1

TypeScript Version: 2.3.0

Code
See repo here: https://github.com/mohsen1/ts23-super-issue

import React from 'react';

export default class Component extends React.Component {
    constructor(...args) {
        super(...args)
    }
}

Expected behavior:

No error

Actual behavior:

Error: src/component.js(5,9): error TS2346: Supplied parameters do not match any signature of call target.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions