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.
Examples
Section titled “Examples”Type-Only Re-exports
Section titled “Type-Only Re-exports”import type { User } from "./types";export { User };import type { User } from "./types";export type { User };Inline Type Imports
Section titled “Inline Type Imports”import { type Post } from "./types";export { Post };import { type Post } from "./types";export type { Post };Options
Section titled “Options”This rule is not configurable.
When Not To Use It
Section titled “When Not To Use It”If you prefer not to distinguish between type and value exports, you can disable this rule.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.