How to typecast from a PhotonStream to a variable type in uJS

How do I correctly typecast a value in uJS that is being sent in a stream?

While this works, I would like to correctly typecast different variable types from a PhotonStream read (in Unity JavaScript) :

function OnPhotonSerializeView( stream : PhotonStream, info : PhotonMessageInfo )
	if ( stream.isWriting )
		// We own this player: send the others our data
		stream.SendNext( transform.position ); 
		stream.SendNext( transform.rotation );
		stream.SendNext( desiredVelocity );
		stream.SendNext( inputVector );
		stream.SendNext( moveSpeed );
		// Network player, receive data
		transform.position = stream.ReceiveNext(); // ( Vector3 )stream.ReceiveNext();
		transform.rotation = stream.ReceiveNext(); // ( Quaternion )stream.ReceiveNext();
		desiredVelocity = stream.ReceiveNext(); // Vector3
		inputVector = stream.ReceiveNext(); // Vector3
		moveSpeed = stream.ReceiveNext(); // float

You don’t need to; Unityscript will implicitly downcast for you if needed. As long as the variables are typed to begin with, there’s no issue (e.g., transform.position is always a Vector3 so that’s fine).