Touch Develop retirement postponed until June 22, 2019. Sign-in and access to cloud assets to be removed on May 23, 2018.Learn More..

action types

TouchDevelop comes with a number of action types predefined. The simplest one is Action, which neither takes nor returns parameters. There is also Text Action, which takes a String and so on.
Sometimes you will find that the built-in ones are not enough, for example when you define your own record type and want to pass an action around that operates on this types. This is where the action types come in handy.
To define such a type, tap on + button for adding actions, pages, art, etc. Scroll down and find callback. This will add a new action type, with initially empty signature. You can edit this signature in exactly the same way as you edit signature of regular actions.
function type
my callback
p : Number,
p2 : Number,
p3 : Number)
returns (
s : String)
Once you're done, you will see your new callback type appear in the list of types, that you can use as arguments of your own actions.
Action types can be public or private, just like normal actions. This matters for libraries.