Skip to content

Not to remove unused import module ? #21114

Description

@zD98

TypeScript Version: 2.4.1

Code

// tsconfig.json
{
...
"jsx": "preserve",
...
}
// my preact Component
import {h, Component} from 'preact'
class C extends Component<any, any> {
    render(){
    // ...
    }
}
// after compiled
import { Component } from 'preact'

So it will throw an error, such as "h is not defined"

Expected behavior:

// after compiled
import {h, Component } from 'preact'

Actual behavior:

// after compiled
import {Component} from 'preact' 

Related:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions