The league table script from the last video starts with import { type TeamRow, ResultsTable } from "./results-table.ts";. The path ends in .ts, and that may look odd. Many TypeScript projects, tutorials, and AI suggestions use ./results-table.js instead, even though no such file exists.
In this lesson, you’ll see why the Riverside project’s paths name the .ts file. You’ll read the error that a .js path causes, and you’ll learn which settings in tsconfig.json let the checker accept a .ts path.
Name the File That Node.js Runs
An import path tells the runtime which file to load, as it did in Modules and JSON: Programs Across Files. In older code and many guides, the league table’s import line would end in .js:
import { type TeamRow, ResultsTable } from "./results-table.js";