Skip to content

types-first ​

Check that "types" is the first condition in every condition map

PropertyValue
Rule IDexports/types-first
Categoryexports
Severity🔴 error
Fixable🔧 Auto-fixable (safe)

What it Checks ​

TypeScript requires "types" to be the first condition in every exports condition map. If it appears after other conditions, TypeScript may fail to resolve your type declarations.

Configuration ​

Disable this rule:

bash
tspub check --ignore-rules "exports/types-first"

Or in tspub.config.ts:

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

Released under the MIT License.