Using static typing for a Component

I am trying to type out a static typing for my Component variable. But the compiler is having trouble.

private var tempComp : Component;
//
function Awake() {
    infoComp = Camera.main.GetComponent("CentralSavingScript");
infoComp.PlayerInfo();
}

This is giving me an error saying:

BCE0019: ‘PlayerInfo’ is not a member of ‘UnityEngine.Component’.

I don’t know what type I have to cast tempComp as in order to remain as a static type. Thanks for any help.

Ok, so with some serious researching and trying to change the way I’ve been doing things for seven months now. I think I’ve figured out a solution. Here is the revised code without error.

private var tempComp : CentralSavingScript;
//
function Awake() {
    infoComp = Camera.main.GetComponent(CentralSavingScript) as CentralSavingScript;
infoComp.PlayerInfo();
}

No exceptions are thrown up and it works. So I’m guessing this follows the static type casting in unity.