Skip to content

Commit

Permalink
Update cffunction.json
Browse files Browse the repository at this point in the history
Added script syntax for an arrow function.
  • Loading branch information
scallahan-dev authored Jul 18, 2024
1 parent ecfda5c commit fb5bafc
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions data/en/cffunction.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,23 @@
"title": "Script Syntax",
"description": "",
"code": "public boolean function myFunction(required any myArgument) { \r\n // Some function bits \r\n return true; \r\n }",
"result": ""
"result": "",
"runnable": true
},
{
"title": "Tag Syntax",
"description": "",
"code": "<cffunction access=\"public\" returntype=\"boolean\" name=\"myFunction\"> \r\n <cfargument required=\"true\" type=\"any\" name=\"myArgument\"> \r\n <!--- Some function bits ---> \r\n <cfreturn true> \r\n </cffunction>",
"result": ""
}
"title": "Tag Syntax",
"description": "",
"code": "<cffunction access=\"public\" returntype=\"boolean\" name=\"myFunction\"> \r\n <cfargument required=\"true\" type=\"any\" name=\"myArgument\"> \r\n <!--- Some function bits ---> \r\n <cfreturn true> \r\n </cffunction>",
"result": "",
"runnable": true
},
{
"title": "Script Syntax: Arrow Function",
"description": "Note that as of now, you cannot declare the access or returntype of an arrow function",
"code": "myFunction = (required any Arguments) => {\n return true;\n}",
"result": "",
"runnable": true
}
]

}

0 comments on commit fb5bafc

Please sign in to comment.