v0.13.8
errors and warnings / parsing

errors and warnings / parsing / E0119

E0119 error

export local without an initializer

area
parsing (x01xx)
fails the build
yes

An export local has no initializer. Exported bindings can't be assigned after their declaration (E1010), so the value must be given where it is exported. For state that changes, export a table and change its contents.

Example

× failswowlua
export local count: number
✓ compileswowlua
export local count: number = 0

The compiler reports it like this:

error[E0119]: `export local` needs an initializer
  ┌─ src/main.wowlua:1:1
  │
1 │ export local count: number
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ here
codemessage
E1010Assignment to an exported or imported binding

Offline

terminal
$ wowlua explain E0119
E0119 (error): export local without an initializer

source on GitHub ↗