add type declaration in script