Manage your learning questions and answers
Use import/export syntax; configure moduleResolution in tsconfig if needed.
import { readFile } from "node:fs/promises";
export const read = (p: string) => readFile(p, "utf8");
Both describe shapes. Interfaces are extendable/mergeable; type aliases are more flexible for unions/intersections.
number, string, boolean, null, undefined, symbol, bigint, arrays, tuples, and object types.