Skip to content

Type Hinting

Jiowcl edited this page Jul 11, 2026 · 2 revisions

Type Hinting

Type Error Messages

Context Message shape
Parameter parameter #N expected …
Let binding binding #N expected …
Return value return value #N expected …

Return and let Type Annotations

Style Example
Comma return types def f() -> number, string
Tuple return types def f() -> (number, string)
Per-binding let types let a: number, b: string = f()
Tuple let types let (a, b): (number, string) = f()

All of the above use runtime checks only (not compile-time strict typing).

Clone this wiki locally