port CmdConfig to typescript

fix some typescript module referencing errors, which were
bugs-waiting-to-happen-though-not-just-yet.