add type annotation for setvartype