Import all in ES6, but not inside an object [dupli

2019-02-18 15:57发布

问题:

This question already has an answer here:

  • How to import everything exported from a file with ES2015 syntax? Is there a wildcard? 3 answers

Is there anyway not to write this:

import {replace_in_mtstr, tot_width, rationalize, eval_expression, ascii_to_latex, latex_to_ascii, getIndicesOf, cleanIndices, change_sign, exponentiate, multiply_grouped_nodes, flip_fraction, add_brackets, are_of_type, any_of_type, have_same_ancestors, have_same_type, have_same_text, have_single_factor, have_same_denom, are_same_terms, get_prev, get_next, get_all_next, has_op, parse_mtstr, parse_poly, prepare} from "./functions";

in ES6? These are all the exported functions in a different file. The closes thing I know is import * as object from 'file';. However, I want to have the functions available directly, not inside an object. Is this possible in ES6?

回答1:

As the comments indicate, this is not possible.