NodeJS has a built-in argument parser
Wrapping it with something that can handle type/value mutation is reasonably trivial
And cluing-in TypeScript to mutations makes development a little less annoying, and a little less error prone too :-]

NodeJS has a built-in argument parser
Wrapping it with something that can handle type/value mutation is reasonably trivial
And cluing-in TypeScript to mutations makes development a little less annoying, and a little less error prone too :-]
So after much fiddling about, and help from another dev, it seems this is the best that can be done in pure TypeScript to expose RegExp constructor(s) and flag(s)
Not happy that it be incomplete, but am satisfied enough that it'll cover most normal use-cases
One of the definitions I use to figure out if something's Art is if I feel something from it
... I feel things when looking at this TypeScript
Likely there are good reasons why this ain't default behavior, however, in this niche use-case I believe type/tab-hints are worth the computational performance hit to reduce cognitive load