Skip to content

Add missing properties for optional parameters and optional properties #60327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
6 tasks done
golopot opened this issue Oct 23, 2024 · 0 comments Β· Fixed by #60328
Closed
6 tasks done

Add missing properties for optional parameters and optional properties #60327

golopot opened this issue Oct 23, 2024 · 0 comments Β· Fixed by #60328

Comments

@golopot
Copy link

golopot commented Oct 23, 2024

πŸ” 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant