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
Bug Domain: Error Messages Help Wanted
Dominant language
Go
Stars
111k
Forks
14.3k
PR merge metrics
PR metrics pending

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

```ts
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

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.