Refactor fxpay module exports

RESOLVED WONTFIX

Status

Marketplace
Payments/Refunds
P3
normal
RESOLVED WONTFIX
3 years ago
3 years ago

People

(Reporter: kumar, Unassigned)

Tracking

Avenir
x86
Mac OS X
Points:
---

Details

(Whiteboard: [qa-])

fxpay has pseudo modules that do this:

    exports.foo = {}

    exports.someFunction = function() {
      ...
    }

Let's refactor that so we export everything in one place, more like:

    exports.foo = {
      someFunction: someFunction,
      otherFunction: otherFunction,
    }

    function someFunction() {
    }
    
    ...


This makes modules more self-contained and explicit. Instead of calling exports.helper() internally they can just call helper(). It will also put all public exports in one place which is easier when you're looking for symbols. It also encourages the use of named functions which helps in certain debugging scenarios.
Blocks: 1058271
Whiteboard: [qa-]

Updated

3 years ago
Priority: -- → P3
We learned in bug 1137584 that we kind of need to use exports because of circular dependencies. Oh well.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.