Skip to content

typeExports

Reports exports that should use 'export type' syntax.

✅ This rule is included in the ts stylistic presets.

Using export type for type-only exports improves tree-shaking and makes the intent explicit. When exporting symbols that were imported using import type, use export type instead.

import type { User } from "./types";
export { User };
import { type Post } from "./types";
export { Post };

This rule is not configurable.

If you prefer not to distinguish between type and value exports, you can disable this rule.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.