(arg: any)
| 184 | } |
| 185 | |
| 186 | function classifyResetArg(arg: any) { |
| 187 | try { |
| 188 | const ctorName = String(arg?.constructor?.name || '').replace(/^_+/, ''); |
| 189 | const keys = Object.keys(arg || {}); |
| 190 | const hasCreate = typeof arg?.create === 'function'; |
| 191 | const hasModuleName = typeof arg?.moduleName === 'string'; |
| 192 | const isFrameLike = !!arg && (ctorName === 'Frame' || /^Frame(\$\d+)?$/.test(ctorName) || (typeof arg?.navigate === 'function' && typeof arg?.addChild === 'function')); |
| 193 | const isPageLike = !!arg && (ctorName === 'Page' || /^Page(\$\d+)?$/.test(ctorName) || (typeof arg?.content !== 'undefined' && typeof arg?.addChild === 'function')); |
| 194 | return { |
| 195 | ctorName, |
| 196 | keys, |
| 197 | hasCreate, |
| 198 | hasModuleName, |
| 199 | isFrameLike, |
| 200 | isPageLike, |
| 201 | }; |
| 202 | } catch { |
| 203 | return { ctorName: 'unknown' }; |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | function installDeepDiagnostics() { |
| 208 | if (!VERBOSE) return; |
no test coverage detected