Skip to content

ZNTC0408: Class field cannot be named 'constructor'

Class field cannot be named ‘constructor’

Category: Parser: Declaration/Class

class Foo { constructor = 1; }

Reproduce in Playground →

See the error message for cause and resolution.