Runtime Error Class extends value [object Object] is not a constructor or null

I searched. I currently have not found a solution for this particular error message.

I think it has something to do with trying to call the arrow function, “connect” (which is in the node package file i illustrated earlier) from within the ts file.

import * as braintree from 'braintree';
...
gateway: any;
...
this.gateway = braintree.connect({
      environment:  braintree.Environment.Sandbox,
      merchantId:   'personalMerchantId',
      publicKey:    'personalPublicKey',
      privateKey:   'personalPrivateKey'
    });