Add a type spec for this function and mark as private.