import type for things that are only types
A regular import of an interface is erased at compile time in most setups, until a bundler or the isolatedModules flag needs to know without looking, and then it is an error or a leftover runtime import.
import type { Post } from "./types";
import { format, type Options } from "./format";Biome and the TypeScript compiler can both enforce it. It also makes the dependency graph honest: a type-only edge does not pull the module into the bundle.
typescriptbuild