EcmaScript:将所有方法导入本地范围 [英] EcmaScript: Import all methods into local scope

查看:55
本文介绍了EcmaScript:将所有方法导入本地范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种无需限定符即可将所有方法导入范围的方法?其他语言(例如榆木)允许这样做.

Is there a way to import all methods into scope without the necessity of a qualifier? Other languages (like Elm) allow this.

ES6规范允许:

import {map, where} from 'underscore'; //unqualified imports by name only
import * as _ from 'underscore'; //with qualifier

但不是这样:

import * from 'underscore';

推荐答案

根据我的发现:不,目前没有计划将变量导入本地范围的方法.

From my findings: No, there is no current or planned way of importing variables into local scope.

这篇关于EcmaScript:将所有方法导入本地范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆