Import type additional syntax

Jordan Harband ljharb at gmail.com
Wed May 3 19:42:35 UTC 2017


JS doesn't have types in this way. Are you perhaps using Flow or TypeScript?

On Wed, May 3, 2017 at 12:29 PM, somonek <somonek at gmail.com> wrote:

> 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
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170503/1195c7ca/attachment.html>


More information about the es-discuss mailing list