Skip to content

missing-export-equals

Detect CJS modules whose types lack "export ="

PropertyValue
Rule IDtypes/missing-export-equals
Categorytypes
Severity:blue_circle: info
FixableNo

What it Checks

When a CommonJS module uses module.exports = ..., the corresponding .d.ts file should use export = to accurately describe the module shape. Without it, TypeScript consumers may not get correct type information for require() calls.

Configuration

Disable this rule:

bash
tspub check --ignore-rules "types/missing-export-equals"

Or in tspub.config.ts:

typescript
export default {
  check: {
    severityOverrides: {
      "types/missing-export-equals": "off",  // or "warning", "error", "info"
    },
  },
};

Released under the MIT License.