path module
The built-in Node.js module for joining and splitting file paths in a way that works on every operating system.
In more detail
You import it with import path from "node:path"; the node: prefix marks it as built in. Its types come from the @types/node package.
Example
import path from "node:path"; path.join("src", "index.ts")Related terms
- Node.js — A program that runs JavaScript outside the web browser, used mainly to build servers, command-line tools and back-end services.
- DefinitelyTyped — The community repository of type declarations for JavaScript packages, published to npm as @types/package-name.
Taught in
- Verify Your Environment: Running tsc And Bun TypeScript — Production TypeScript