-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Intellisense for Symbol propertiesΒ #54870
Copy link
Copy link
Open
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorSuggestionAn idea for TypeScriptAn idea for TypeScript
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorSuggestionAn idea for TypeScriptAn idea for TypeScript
Suggestion
π Search Terms
With and without "is:issue is:open"
"symbol intellisense"
"symbol autocomplete"
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
Intellisense provides a list of symbol properties which, when accepted, insert indexed accessor syntax for that symbol. This list would be comprised of known symbols within the current scope or those that can be with an import statement.
π Motivating Example
This example demonstrates a type that implements the global
Disposableinterface introduced by TC39 ECMAScript Explicit Resource Management. (#54505)The suggestions shown for
example.do not includeSymbol.dispose.π» Use Cases
TL;DR:
Symbol.disposeandSymbol.asyncDisposeare the first well-known symbols that are useful to call directly, and I want to easily know that they're there.Typically, ES6 Symbols are intended as an implementation detail, but the new global
Disposableinterface, however, is analogous to this very prolific interface:In order to support
usingsyntax, I need to implement the globalDisposableinterface. I have a few options:Disposableinterface, but lose the visibility to developers of the lifecycle management requirements of implementations.Disposableinterface extend the globalDisposableinterface, or possibly merge it with the global one and then, by convention, do the following:An option is to create a utility class decorator that does that for me, but unfortunately that creates the issue of how to make that class recognized as an implementation of the global
Disposable. (#4881)