Just a red warning signal in the editor. It switches to twin Vector3 option for offset and axis. None of the other options include the “duration” parameter. It doesn’t seem to exist at all.
The docs show an entry for rotateLocal(axis: Vector3, angleInRadians: Number, duration: Number). In practice “duration” does not seem to be available. See the example below that should turn 1.5 radians in 5 seconds but doesn’t.
There is actually two different set of rotateLocal methods.
The one with duration parameter is located in transition namespace, that namespace contains all the methods that is “moving” or “transition” the transform of the object with time.
The another one is located in transform itself. It changes the transform “immediately” and do not have duration parameter.
So you can use transition.rotateTransform with duration parameter or, if for some reason you do not satisfied how this methods “animates” transition you can do something similar that you did in rotateDurationHack and animate the transition as you wish with transform.rotateLocal.