Optional properties in inferred mapped type causes auto-completion to break. #49547
Labels
Bug
A bug in TypeScript
Domain: Completion Lists
The issue relates to showing completion lists in an editor
Help Wanted
You can do this
Milestone
Bug Report
Optional properties in inferred mapped type causes auto-completion to break.
π Search Terms
Inferred mapped type with optional properties no auto-complete
π Version & Regression Information
I believe it never worked.
β― Playground Link
https://tsplay.dev/mpnLBw
π» Code
π Actual behavior
No auto-completion offered by editor or IDE in marked lines when pressing
CTRL + SPACE
ora
Edit: You can enter
autoCompleteProp: '',
in the lines where auto-completion fails. The compiler will complain thatautoCompleteProp
must be aboolean
. Thus, the information about the optional property is there, it's just that it never appears in the auto-completion results.π Expected behavior
Auto-complete suggestion for "autoCompleteProp" in every line marked with
<--
The text was updated successfully, but these errors were encountered: