How to override or extend proceed-to-checkout.js

I need to override or extend Magento’s proceed-to-checkout.js file in my module. app/code/Magento/Checkout/view/frontend/web/js/proceed-to-checkout.js

In my modules requirejs-config.js I have tried using a mixin and also replacing the mapping with both…

var config = {     'config': {         'mixins': {             'Magento_Checkout/js/proceed-to-checkout': {                 'Mynamespace_Checkout/js/view/proceed-to-checkout-mixin': true             }         }     } }; 


var config = {     map: {         '*': {             proceedToCheckout: 'Mynamespace_Checkout/js/proceed-to-checkout'         }     } }; 

Neither work and I’m unsure how I should write the mixin as Magento’s original proceed-to-checkout.js file simply returns an anonymous function with a jQuery click event listener.

Any idea how I can get this to work in a module?