Vortex Docs
  • Introduction
  • Getting Started
  • Language Reference
    • Core Functionality
    • Built-in Functions
    • Hooks
    • C Interoperability
    • Coroutines
    • Decorators
    • Type Hinting
    • Error Handling
  • Examples
    • Data Structures
    • Hooks
    • Fetching Data
    • Sockets
    • Event Bus
  • Standard Modules
    • Functional
    • Functools
    • Future
    • I/O
    • JSON
    • Logging
    • Math
    • OS
    • Random
    • Requests
    • SDL
    • SQLite
    • String
    • Sys
    • Time
    • Crypto
    • Websockets
  • Development Roadmap
Powered by GitBook
On this page
  1. Language Reference

Type Hinting

Vortex gives you the ability to type hint variables and functions.

Much like Python, this is not strictly enforced by the compiler. However, this does provide an easy entry point into overlaying a type system over Vortex, since the hints are compiled away.

const addNums = (a: Number, b: Number): Number => a + b

const numVar: Number = 100
const numOrBool: Number | Boolean = true
PreviousDecoratorsNextError Handling

Last updated 1 year ago