Unsure why I am getting errors

This function is currently giving me 2 errors,

Assets/Scripts/poopingDog.js(78,34): BCE0022: Cannot convert ‘UnityEngine.Vector3’ to ‘System.Type’.

Assets/Scripts/poopingDog.js(85,50): BCE0017: The best overload for the method ‘UnityEngine.Vector3.MoveTowards(UnityEngine.Vector3, UnityEngine.Vector3, float)’ is not compatible with the argument list ‘(UnityEngine.Vector3, System.Type, float)’.

But to me it all seems to be correct? What am I doing wrong here?

function Spawn ()
{
	animation.Play("Spawn");
	yield WaitForSeconds (.8);
	animation.Play("Pooping");
	yield WaitForSeconds (poopLength);
	animation.Play("PoopToRun");
	
	var targetPosition = Vector3;
	targetPosition =  Vector3(transform.position.x - 1, transform.position.y, transform.position.z );
	
	var t: 		float = 0.0f;
	
	while(t < 1)
	{
      	t += Time.deltaTime / 2.0;
       	transform.position = Vector3.MoveTowards (transform.position, targetPosition, t);
       	yield;
    }
	
	yield WaitForSeconds (1.5);
	animation.Play("Run");
}

You should tell us what are lines 78 and 85 because you don’t post all of your code.

The first thing I see is :

var targetPosition = Vector3;

Instead of :

var targetPosition:Vector3;