Intellisense: deprioritise native function methods
#61,426 opened on 2025幎3æ15æ¥
Repository metrics
- Stars
- Â (48,455 stars)
- PR merge metrics
-  (å¹³åããŒãž 6d 17h) (30d ã§ 9 merged PRs)
説æ
ð Search Terms
native methods apply bind deprioritise autocomplete
â Viability Checklist
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
â Suggestion
In autocomplete on a function, it would be great if TypeScript could prioritise extra methods/properties over the native ones.
ð Motivating Example
Bun has some APIs that exist on a function, for example Bun.inspect() and also Bun.inspect.table. When typing Bun.inspect. the first few suggestions are more likely not as useful as the extra properties
Here I would have preferred for .custom and .table to be first in the list:
ð» Use Cases
- What do you want to use this for?: Would make it easier for the developer to discover often more useful methods and properties
- What shortcomings exist with current approaches?: Extra methods/props are more difficult to see
- What workarounds are you using in the meantime?: N/A
I would be very happy to help implement this, with some guidance as to roughly where I should look to implement it! Cheers.