beginner40 minby DevFox

import and export: "type": "module", .ts extensions, import type

Split TaskKit's index.ts into four files that share boxes, functions and types with export and import. Learn the three rules Node follows on every import line: “type”: “module” in package.json, the whole file name with .ts, and import type for a type, which Node strips out before the program runs.

  • TypeScript
  • Fundamentals
`import` and `export`: `"type": "module"`, `.ts` extensions, `import type`. Read this lesson at .