Import type additional syntax

somonek somonek at gmail.com
Wed May 3 19:29:21 UTC 2017


Hello,

no research produced me an answer to this combined import syntax

import {
    connect,
    type Dispatch,
} from 'react-redux';

Is this valid?

It's great to avoid duplicating it like this

import type { Dispatch } from 'react-redux';
import { connect } from 'react-redux';

My IDE marks it as an error but the code works.

Thanks

Serghei


More information about the es-discuss mailing list