Setup Error Logging in Serverless

What is the typescript equivalent to this chapter? I am trying to recreate this in typescript but I am hitting a wall with the arguments debug method.