Skip to content

Autofill object literal in IDE #40700

Open
@TheColorRed

Description

@TheColorRed

Search Terms

  • autofill object literal

Suggestion

It would be nice if there was a way to automatically fill in the required values of an object literal so I don't have to do it one property at a time, it would set the value to a minimum value (string '', number 0, etc). Then I can manually add the optional properties and there values.

image

Use Cases

This will help speed up creation of objects that have lots of required items.

Checklist

My suggestion meets these guidelines:

  • 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, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: Completion ListsThe issue relates to showing completion lists in an editorIn DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions