( moduleExports: unknown, memberAccess: string[], )
| 360 | } |
| 361 | |
| 362 | private resolveMemberAccess( |
| 363 | moduleExports: unknown, |
| 364 | memberAccess: string[], |
| 365 | ): { found: boolean; value?: unknown } { |
| 366 | let current: unknown = moduleExports; |
| 367 | |
| 368 | for (const key of memberAccess) { |
| 369 | if ( |
| 370 | current === undefined || |
| 371 | current === null || |
| 372 | (typeof current !== "object" && typeof current !== "function") |
| 373 | ) { |
| 374 | return { found: false }; |
| 375 | } |
| 376 | |
| 377 | const container = current as Record<string, unknown>; |
| 378 | |
| 379 | if (!(key in container)) { |
| 380 | return { found: false }; |
| 381 | } |
| 382 | |
| 383 | current = container[key]; |
| 384 | } |
| 385 | |
| 386 | return { |
| 387 | found: true, |
| 388 | value: current, |
| 389 | }; |
| 390 | } |
| 391 | |
| 392 | private async executeResolvedMember( |
| 393 | member: unknown, |
no outgoing calls
no test coverage detected