Need to useprovide a method on variabletype annotation for whicha variable so that you haven't yet constrained the typecan call a method on it? Just compare it against a literal of the type you want it to be then throw away the result to annotate that variable's type:
let f (x:string)=x.Length let f x=x="";x.Length