Skip to content

Autocomplete for string-indexed members even from dot-notation #36429

@JasonKleban

Description

@JasonKleban

Sometimes the keys of a map-object are not valid typescript identifiers, yet they are strongly typed members still. Invoking autocomplete within [''] does suggest them and, as you know, the string indexer is fully type-checked in such a situation.

Supposing I have members hello, return and delete on an object, can they be suggested in the dot-notation autocomplete as well and then just automatically converted to indexer form since?

myObj.            // should offer all members, `hello`, `return` and `delete`
myObj['return']   // choosing `return` replaced the dot-notation with indexed notation and completes the accessor

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityjavascriptJavaScript support issuestypescriptTypescript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions