Cosmo Docs
  • 👋Welcome to the Cosmo Docs!
  • General Information
    • ⭐Getting Started
    • 🧱Modules
    • 🌐Meta methods
  • Contributing
    • 🤝Welcome!
    • ⚛️Intrinsics
    • 📝Grammar
Powered by GitBook
On this page
  1. General Information

Modules

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

Warning: There's currently a bug that makes it so that you cannot use types imported from other files. This includes classes. Sorry, this will be fixed soon hopefully.

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.

PreviousGetting StartedNextMeta methods

Last updated 1 year ago

🧱