No, because be 4th argument must be the duration. Additionally there’s no point to having a timing function without a duration since it will just be applied instantly.
(you are missing a comma and closing parenthesis, so it will probably cause a syntax error first )
This will work:
hypeDocument.setElementProperty(a, 'rotateZ', val1, 2.0);
It will cause a 2.0 second animation with an
'easeinout' timing function (the default if left unspecified).
Basically if a optionalDuration is given to setElementProperty, it creates an ad-hoc timeline animating that property. If no duration is given, it immediately changes the value.