Assigning a variable to animation

I like being able to assign what scripts,models,etc to use for a model in the inspector. to do this I would use something similar to this:
var x : GameObject;

or

var x : int;

I was wondering how would I assign an animation to it. So something like this:
var x : Animation

this is all in JS

you can make animation component and animation clip both

var animComponent : Animation;
var animClip : AnimationClip; 

 animComponent.CrossFade(animClip.name);

An alternative solution is to create an AnimationController with the animations you might use and possible transitions. In code, instead of referencing AnimationClips, you can activate triggers:

I find this approach easier to debug since you have access to the Animator view and can visualize transitions and the currently active animation.