Repository: TypeScript
Issue: TypeError: Cannot read properties of undefined (reading 'length') at elaborateDidYouMeanToCallOrConstruct
Labels: Needs More Info

### 🔎 Search Terms

undefined length elaborateDidYouMeanToCallOrConstruct

### 🕗 Version & Regression Information

- This changed between versions 5.5.4 and 5.6.2
- I was unable to test this on the latest version because `npm i typescript@next` never completed, spamming the terminal with the following error for about 20 minutes before I killed it:

```
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: coracle@0.4.14
npm warn Found: typescript@5.7.0-dev.20241018
npm warn node_modules/typescript
npm warn   typescript@"5.7.0-dev.20241018" from the root project
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional typescript@">=5.0.0" from nostr-tools@2.8.1
npm warn node_modules/nostr-tools
npm warn   nostr-tools@"^2.8.1" from the root project
npm warn   4 more (@welshman/content, @welshman/dvm, @welshman/signer, @welshman/util)
```


### ⏯ Playground Link

_No response_

### 💻 Code

I'm not able to isolate the problem because the compiler is crashing without any information about my source files. You can clone the project from https://github.com/coracle-social/coracle and reproduce simply by running `git checkout 5e70d4ed499b6721f41318644b6250713085c923; npm i; npx tsc`.

### 🙁 Actual behavior

Running `npx tsc` in my project gives me:

```

/Users/me/nostr/coracle/node_modules/typescript/lib/tsc.js:120987
      throw e;
      ^

TypeError: Cannot read properties of undefined (reading 'length')
    at elaborateDidYouMeanToCallOrConstruct (/Users/me/nostr/coracle/node_modules/typescript/lib/tsc.js:62406:62)
    at elaborateError (/Users/me/nostr/coracle/node_modules/typescript/lib/tsc.js:62360:10)
    at checkTypeRelatedToAndOptionallyElaborate (/Users/me/nostr/coracle/node_modules/typescript/lib/tsc.js:62344:24)
    at getSignatureApplicabilityError (/Users/me/nostr/coracle/node_modules/typescript/lib/tsc.js:74383:14)
    at resolveCall (/Users/me/nostr/coracle/node_modules/typescript/lib/tsc.js:74779:25)
    at resolveCallExpression (/Users/me/nostr/coracle/node_modules/typescript/lib/tsc.js:75194:12)
    at resolveSignature (/Users/me/nostr/coracle/node_modules/typescript/lib/tsc.js:75587:16)
    at getResolvedSignature (/Users/me/nostr/coracle/node_modules/typescript/lib/tsc.js:75613:18)
    at checkCallExpression (/Users/me/nostr/coracle/node_modules/typescript/lib/tsc.js:75724:23)
    at checkExpressionWorker (/Users/me/nostr/coracle/node_modules/typescript/lib/tsc.js:79133:16)

Node.js v20.18.0
```

On my Debian 11 VPS, I get a similar error:

```

/home/me/node_modules/typescript/lib/tsc.js:120986
      throw e;
      ^

TypeError: Cannot read properties of undefined (reading 'length')
    at elaborateDidYouMeanToCallOrConstruct (/home/me/node_modules/typescript/lib/tsc.js:62405:62)
    at elaborateError (/home/me/node_modules/typescript/lib/tsc.js:62360:10)
    at checkTypeRelatedToAndOptionallyElaborate (/home/me/node_modules/typescript/lib/tsc.js:62344:24)
    at getSignatureApplicabilityError (/home/me/node_modules/typescript/lib/tsc.js:74382:14)
    at resolveCall (/home/me/node_modules/typescript/lib/tsc.js:74778:25)
    at resolveCallExpression (/home/me/node_modules/typescript/lib/tsc.js:75193:12)
    at resolveSignature (/home/me/node_modules/typescript/lib/tsc.js:75586:16)
    at getResolvedSignature (/home/me/node_modules/typescript/lib/tsc.js:75612:18)
    at checkCallExpression (/home/me/node_modules/typescript/lib/tsc.js:75723:23)
    at checkExpressionWorker (/home/me/node_modules/typescript/lib/tsc.js:79132:16)

Node.js v18.20.4
```

### 🙂 Expected behavior

I expect typescript to not crash.

### Additional information about the issue

I completely re-installed nvm/npm/node, removed all node_modules folders on my system, removed the project director and re-cloned, just to make sure my environment wasn't dirty somehow.