How to get new access token from refresh token with googleapis npm package

I cannot seem to find an answer to this anywhere. All the docs say that refresh tokens are used to get new access tokens, but nowhere is it explained how this actually works.

Usually I would use this function accompanied by the code you get from the google consent page:
oauth2Client.getToken(code).
So I would expect something like this:
oauth2Client.getTokenWithRefreshToken(refresh_token).
But no.
Am I just misunderstanding the concept of refresh tokens?