TypeScript Version: 3.7.x-dev.201xxxxx
Search Terms: jsx intellisense autocomplete
Code
importReactfrom"react";interfaceKlassComponentProps{one?: string;two?: number;problematic?: any;}/** * A component that can be used directly, or subclassed. * Any derived components can have additional props, but must at least have * the props from `KlassComponentProps`. * */classKlassComponent<TPropsextendsKlassComponentProps=KlassComponentProps>extendsReact.Component<TProps>{}functionTestComponent(){// Problem: autocomplete options (ctrl+space) do not include `one` or `two`// once the `problematic` prop is assignedconstbadcase=<KlassComponentproblematic="test"></KlassComponent>;// Without `problematic`, prop autocomplete shows `one` and `two`.constokcase=<KlassComponent></KlassComponent>;}Expected behavior:
With both usages of KlassComponent, bringing up editor autocomplete should include the one and two props in the list of remaining props.
Actual behavior:
The one and two prop are not shown once the problematic prop is assigned.
Playground Link:Link
Related Issues:#29017
TypeScript Version: 3.7.x-dev.201xxxxx
Search Terms: jsx intellisense autocomplete
Code
Expected behavior:
With both usages of
KlassComponent, bringing up editor autocomplete should include theoneandtwoprops in the list of remaining props.Actual behavior:
The
oneandtwoprop are not shown once theproblematicprop is assigned.Playground Link:Link
Related Issues:#29017