Yeah, either of those seems fine.  I'd lean toward the 2nd form since we use that pattern in a number of other modules (and it doesn't force you to export APIs that you don't actually want anyone other than registerCustomViewer() to call).