Pages
Introduction
Getting Started
Recipes
Reference
Literals
Arrays
Tuples
Type System
Functions
Modules
Records
Enums
Built-in Types
Constants
Equality
Stores
Routing
Comments
Control Expressions
Components
Properties
Computed Properties
Styling Elements
Connecting Stores
Using Providers
Internal State
Referencing Entities
Global Components
Lifecycle Functions
Directives
JavaScript Interop
Environment Variables
Packages
Constants
Constants can be added to stores , modules and components.
module Math {
const PI = 3.141592653589793
}
Constants can be accessed like variables inside the scope of the entity which defined them and from outside they can be accessed with the following syntax:
Math:PI
The variable name of a constant must be in all-uppercase characters.