fix(doc): #61432 typing
- [x] closes #61432
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

@mroeschke thank you for the approval. Wouldn't the PR fit for 2.2.4 or 2.3.0? It seems to be merely a fix to me. This PR will go into 3.0. No whatsnew entry is needed for this PR. Thanks @cmp0xff 