web stats
Mirth Community - View Single Post - ES6 Syntax Highlighting
View Single Post
  #2  
Old 03-08-2019, 08:11 AM
akathol akathol is offline
Mirth Newb
 
Join Date: Sep 2014
Location: OR, USA
Posts: 10
akathol is on a distinguished road
Default

Also, I don't seem to be able to use all of the expected ES6 functionality. Has anyone asked this at one of the developer Q&A sessions?

Arrow functions [yes]
Use of let and const [yes]
Template literals [no]
Default parameters in functions [no]


When I try to use a template literal in a javascript filter/transform like this:
Quote:
logger.error(`testing`);
I get this validation error:
Quote:
Error in connector "sourceConnector" at filter rule 0 ("null"):
Error on line 12: illegal character: ` (a0fce48c-3f3c-4e1b-b04a-af285ac058ec#12).

When I try to create the following function:
Quote:
function testFunc(a, b = 3) {
return a+b;
}
logger.error(testFunc(4,6));
logger.error(testFunc(3));
I get this error:
Quote:
Error in connector "sourceConnector" at filter rule 0 ("null"):
Error on line 12: missing ) after formal parameters (801ba5ac-9ee5-46d0-9ca4-ec0277e5e68b#12).

Last edited by akathol; 03-08-2019 at 08:24 AM.
Reply With Quote