tomo/api/README.md
2024-08-18 18:30:40 -04:00

926 B

API

Tomo has a small number of built-in functions and bunch of types.

Types

Built-in Functions

say

Description:
Prints a message to the console.

Usage:

say(text:Text) -> Void

Parameters:

  • text: The text to print.

Returns:
Nothing.

Example:

say("Hello world!")

fail

Description:
Prints a message to the console, aborts the program, and prints a stack trace.

Usage:

fail(message:Text) -> Abort

Parameters:

  • message: The error message to print.

Returns:
Nothing, aborts the program.

Example:

fail("Oh no!")