I found I had to do:
import { default as libphonenumber } from "google-libphonenumber";
const phoneUtil = libphonenumber.PhoneNumberUtil.getInstance();
const number = phoneUtil.parse(input, countryCode);
const numberE164 = phoneUtil.format(number, libphonenumber.PhoneNumberFormat.E164);
as answered here: https://github.com/ruimarinho/google-libphonenumber/issues/17#issuecomment-121340131