Yaw (Z-rotation) angle linear interpolation without quaternions
Finding shortest angular distance.
I have always found the method of normalising angles with
const PI2 = Math.PI * 2;
var angle = ((angle % PI2) + PI2) % PI2;

and then finding the shortest angular distance a little bit hacky. This is even more so when the angles are originally vectors.
Cross and dot products.
Math.asin of the cross product of two vectors gives the angle left or right of first vector in the range -90 to 90 deg and the sign of the dot product will indicate if the vectors are in the same direction or not letting you get the quadrant the second vector is in and thus the shortest angular direction from one vector to the next.
The results are always relative to the direction of the first vector so you dont need to normalise the angle to 0 -Math.PI * 2
Polar to cartesian
As you want to work in angles (polar) you just need the extra step of calculating the cartesian vectors.
The function to find the shortest angular distance between any two bearings (angles).
// a and b are angles in radians
// returns direction in radians
function shortestAngle(a,b){
    const ax = Math.cos(a); // create vector a
    const ay = Math.sin(a);
    const bx = Math.cos(b); // create vector b
    const by = Math.sin(b);
    
    // asin cross product to find angle
    const angle = Math.asin(ax * by - ay * bx);

    // and dot to help find the quadrant
    const dot = (ax * bx + ay * by);

    // if facing in different direction dot &lt; 0 angle will be
    // over 90 or under -90 else between  90 and -90
    return dot &lt; 0 ? Math.sign(angle) * Math.PI - angle : angle;
}

Then to interpolate you just scale the result of the above function
// a is start angle 
// angDist is angular distance
// time is time in range 0 to 1
function slerp(a, angDist, time) {
    return angDist * time + a;
}

Gives in my view, a cleaner less hacky solution.
 // using
 var angle1 = ?
 var angle2 = ?
 var angDist = shortestAngle(angle1, angle2);
 var angle = slerp(angle1, angDist, time);

Which is even better if you are already working with vectors rather than angles.