Skip to content

Add missing properties for optional parameters and optional propertiesΒ #60327

Closed
@golopot

Description

@golopot

πŸ” Search Terms

"add missing properties", "quick fix", "optional parameters", "optional property"

βœ… Viability Checklist

⭐ Suggestion

Offer "add missing properties" quick fix for optional parameters and optional properties.

πŸ“ƒ Motivating Example

type T = { t: string }
function f(arg?: T) {}
f({})
// expect quick fix "add missing property" to be available at `{}`

type U = { u?: { v: string } }
const u: U = { u: {} }
// expect quick fix "add missing property" to be available at `u`

Playground Link

πŸ’» Use Cases

  1. What do you want to use this for? better DX
  2. What shortcomings exist with current approaches? manual input
  3. What workarounds are you using in the meantime? manual input

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions