assign type to function definition and call expression