Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness.language

Missing super() in subclass constructor

Subclass constructors must call super() before using this.

#Metadata

Rule ID
ts.correctness.missing-super-call
Severity
high
Confidence
0.95
Languages
javascript, typescript
Presets
recommended, strict
Stability
stable
Applies to
file
Tags
correctness, crq-cor-034, language, rules-catalog

#Why it matters

Derived classes must initialize the base class; omitting super() is a runtime error when this is accessed.

#Remediation

Add `super(...)` as the first statement in the constructor (before using this).

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.correctness.missing-super-call.rule.yaml.