Skip to main content

Declarations

All declarations in a module are available for import from within other modules.

Constants

knot
const TIMEOUT = 100;
const ERR_MESSAGE = "failed to connect";
const DEBUG = false;
knot
const TIMEOUT = 100;
const ERR_MESSAGE = "failed to connect";
const DEBUG = false;

Function

knot
func add(lhs: integer, rhs: integer) -> lhs + rhs;
knot
func add(lhs: integer, rhs: integer) -> lhs + rhs;

View

knot
view Header ->
<header>
<h1>Welcome!</h1>
</header>;
knot
view Header ->
<header>
<h1>Welcome!</h1>
</header>;