v0.13.7
errors and warnings / types

errors and warnings / types / E2002

E2002 error

Unknown type name

area
types (x2xxx)
fails the build
yes
in plain Lua files
reported as W2002

A type annotation names a type that doesn't exist: a typo, a type declared in another module that isn't imported, or a type only some flavors have. Check the spelling, or bring the type in with import type Name from "./module".

Example

× failswowlua
local f: Fram = CreateFrame("Frame")print(f)
✓ compileswowlua
local f: Frame = CreateFrame("Frame")print(f)

The compiler reports it like this:

error[E2002]: unknown type `Fram`
  ┌─ src/main.wowlua:1:10
  │
1 │ local f: Fram = CreateFrame("Frame")
  │          ^^^^ not declared
codemessage
E2013Wrong number of type arguments

Offline

terminal
$ wowlua explain E2002
E2002 (error): Unknown type name

source on GitHub ↗