Why wheelJoints = gameObject.GetComponents(WheelJoint2D); is not working in javascript?

I have attached two wheeljoint2d in my gameobject. To control the motor speed i need to get that wheeljoint. So i wrote in c# like this.

wheelJoints = gameObject.GetComponents<WheelJoint2D>(); ;

here wheeljoints is an array and working good. But when i tried this same thing in javascript like this

wheelJoints = gameObject.GetComponents(WheelJoint2D); 

it is nor working and i am getting an error

Can not cast from source type to
destination type

What can i do know? What i am missing. Please help me.

wheelJoints = gameObject.GetComponents.();