Skip to content
JS
JavaScript error

TypeError

The JavaScript exception "derived class constructor returned invalid value x" occurs when a derived class constructor returns a value that is not an object or undefined.

Reference entryJavaScriptFetched
TypeError: Derived constructors may only return object or undefined (V8-based)
As listed by MDN Web Docs
TypeError: derived class constructor returned invalid value 1 (Firefox)
As listed by MDN Web Docs
TypeError: Cannot return a non-object type in the constructor of a derived class. (Safari)
As listed by MDN Web Docs
Category
TypeError
Severity
error
Runtime
both
or press Cmd/Ctrl + Enter. The text is only sent to this site to match it.
Source: MDN Web Docs. Data fetched 2026-09-25T01:48:37.274Z.