I originally thought I'd use the formatter function directly, or externalize it or something, so it currently takes in an options object and does type checking on the options.
For simplicity, it makes more sense to treat it like the rest of the code in this codebase and have it grab the options off the globalThis.vueSnapshot.formatting object. Which by that point would have gone through the "loadOptions" function which is already doing the type checking once (no need to do it in two places).
I originally thought I'd use the formatter function directly, or externalize it or something, so it currently takes in an options object and does type checking on the options.
For simplicity, it makes more sense to treat it like the rest of the code in this codebase and have it grab the options off the
globalThis.vueSnapshot.formatting
object. Which by that point would have gone through the "loadOptions" function which is already doing the type checking once (no need to do it in two places).