errors and warnings / parsing / E0117
E0117 error
import _ combined with other names
- area
- parsing (x01xx)
- fails the build
- yes
import _ is combined with other names, as in import _, clamp from "./math".
import _ only makes sure a file loads first and binds nothing, so it must be
the only name in its import. A named import already loads its module first,
so drop the _.
Example
import _, clamp from "./math"print(clamp(5, 0, 1))import clamp from "./math"print(clamp(5, 0, 1))export function clamp(v: number, lo: number, hi: number): number return math.max(lo, math.min(hi, v))endThe compiler reports it like this:
error[E0117]: `import _` cannot be combined with other names ┌─ src/main.wowlua:1:8 │ 1 │ import _, clamp from "./math" │ ^ here
Offline
$ wowlua explain E0117 E0117 (error): import _ combined with other names