setAllTyped is not a function error

Hi, I’m using the GitHub - camunda/camunda-external-task-client-js: Implement your BPMN Service Task in NodeJS. library. In the worker handler I’m sending the full task info to a rabbitmq but the variable section is always {}. So I’m trying to do somenthing like

const variables = task.variables.getAllTyped();


so I can get the variable section with data in the rabbitmq but I’m getting this error:

"type":"TypeError","message":"task.variables.setAllTyped is not a function","stack":"TypeError: task.variables.setAllTyped 
is not a function\n