Curriculum Errors & packaging Packages & imports exercise 4 · fill-word
Packages & imports
Type the keyword that declares this file's package. The file
is the entry point of an executable, so the package name is
main.
TS doesn't have this concept — files are modules implicitly.
Go requires every file to declare its package as the very
first non-comment line.
TypeScript reference
Fill the blanks →
About this theme
Every file declares a package: package foo. Names starting with a capital letter are exported; lowercase are package-private. This rule is mechanical and pervasive; once you internalise it, you stop needing to look at export keywords because there aren't any. Imports go in a single import (...) block.