Repository: TypeScript
Issue: More object literal snippet completions for `string`, `Object`, `Array` and `boolean` properties
Labels: Suggestion,In Discussion,Domain: Completion Lists

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [z] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [z] This wouldn't change the runtime behavior of existing JavaScript code
* [z] This could be implemented without emitting different JS based on the types of the expressions
* [z] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [z] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

I think many users find `includeCompletionsWithObjectLiteralMethodSnippets` super useful, I have an idea to do the same for other types.

## 📃 Motivating Example

```ts
declare const configureMe: (options: {
    name: string
    type: 'a' | 'b'
    enable: boolean
    otherOptions: Record<string, any>
    mixins: any[]
}) => void

configureMe({
    
})
```

<img width="503" alt="Screenshot 2023-02-13 at 13 04 31" src="https://user-images.githubusercontent.com/46503702/218429045-491f60f0-55a6-4661-bb6c-644e1e1d6b47.png">

Snippet completions described by types:

<table>
<tr>
	<td>string
	<td><code>: "$1",$0
<tr>
	<td>boolean
	<td><code>: ${1|true,false|},$0
<tr>
	<td>arrayLike
	<td><code>: [$1],$0</code> or <code>: [\n\t$1\n],$0
<tr>
	<td>object (but not class or regexp)
	<td><code>: {$1},$0</code> or <code>: {\n\t$1\n},$0`
</table>

Also I think preference should be added to allow these object literal completions with snippet to be displayed above original suggestions (or even remove these original suggestion, if user really wants it) eg `completionsWithObjectLiteralSnippetsNonSnippetPosition: /*default*/ 'before' | 'after' | 'remove'`

Also in vscode plugin I found extremely useful triggering additional suggest widget after such snippet completion accept.

Can I try to implement this if its good?

Note: I use on a daily basis with my TS plugin: here is [current implementation](https://github.com/zardoy/typescript-vscode-plugins/blob/develop/typescript/src/completions/objectLiteralCompletions.ts) if someone is interested.