let {a,b}={a:1,b:2}; is perfect again. My first addition of isCodeType() was missing the first argument.