JS: switched to the structural type system.