// I imported a type. Why did code run? // Teaching excerpts; see the explanation and boundaries on the episode page. // The type goes. The import stays. // TypeScript import { type Model } from "./dep.js"; // Emitted JavaScript import {} from "./dep.js"; // Nothing imported. Something executed. // dep.ts export interface Model { id: string; } console.log("loaded"); // Move type outside the braces. import type { Model } from "./dep.js"; // No dep.js import in the output // Need startup code? Say so directly. import type { Model } from "./dep.js"; import "./dep.js";