Type Casting

Since variables in Jelly have no specific type when they are declared, you will need to tell some functions how they should treat a variable. To get started add the following syntax after a variable .as(<#Casting Type#>). This will tell Jelly how it should treat the given variable.

An example of this in action, is creating a variable named textInput and assigning it to the Shortcut Input as text. This will create a variable that maps to the Shortcut Input casted to Text

var textInput = Shortcut Input.as(Text)

Casting Types

  1. AppStore
  2. Article
  3. Boolean
  4. Contact
  5. Date
  6. Dictionary
  7. Email
  8. File
  9. Image
  10. iMedia
  11. iProduct
  12. Location
  13. MapLink
  14. Media
  15. Number
  16. PDF
  17. PhoneNumber
  18. Photo
  19. Place
  20. RichText
  21. Webpage
  22. Text
  23. URL
  24. VCard