microsoft / microsoft/TypeScript

Deprecation error message reporting method type as deprecated instead of method name

Open
#62,396 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Domain: Error Messages Help Wanted
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

🔎 Search Terms

deprecated type

🕗 Version & Regression Information
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.9.2#code/JYWwDg9gTgLgBAbzgLzgXzgMyhEcBEyEAJvgNwBQFAxhAHYDO8MDtdmwA5gEoCGA7gGVqACwCmIXnAC8KAHQQARgCsx1GAAoEFOLri1wwADZioAeTAxg9BgC55vOgE8NASgppXcsLwZMROACunCJulEA

💻 Code
import { z } from "zod";

const tsconfigRawSchema = z.object({
    compilerOptions: z.any()
}).passthrough();
🙁 Actual behavior

Hover passthrough:

'(): ZodObject<{ compilerOptions: ZodAny; }, $loose>' is deprecated.
🙂 Expected behavior
'passthrough()' is deprecated.

or something like that.

Additional information about the issue

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked TypeScript Playground repro and the passthrough() call shown in the issue, then trace how its deprecated hover text is produced. Done means the hover reports passthrough() rather than the generated method type, while preserving the expected deprecation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.