一排多个导入

时间:2018-08-29 08:59:33

标签: javascript flowtype

我想优化导入。有什么方法可以使用Flow在一行中导入类型和默认值?

import { default as ListIcon } from './List';
import type { Props as ListProps } from './List';

import { default as GridIcon } from './Grid';
import type { Props as GridProps } from './Grid';

谢谢你!

1 个答案:

答案 0 :(得分:0)

是的,您可以Import multiple exports from module as follows

import { default as ListIcon, Props as ListProps } from './List';