Skip to content

Multiple return values

Maciej Górski edited this page Jan 6, 2016 · 2 revisions

Whenever a function returns multiple values, you may skip those that are of no interest to you.

function someFunc() -> (returnedBool: boolean, returnedString: string) { true, "" }

myBool is returnedBool, myString is returnedString = someFunc()
b is returnedBool = someFunc()
s1 is returnedString, s2 is returnedString = someFunc()

Clone this wiki locally