🧱Modules

Modules are used to separate Cosmo code into separate files and import them from another file.

Cosmo's module system is similar to TypeScript. Here is an example of how you might import a file in the same directory:

use member from "./mod_name"

You can import any intrinsics or Stars packages by just omitting the ./ and writing the name of the package/intrinsic.

Last updated