Today, if you try to request completions after an object literal element that has no comma, you'll get no useful contextual completions.
interface ColorPalette {
primary?: string;
secondary?: string;
}
let colors: ColorPalette = {
primary: "red"
/*$*/
};

interface ColorPalette {
primary?: string;
secondary?: string;
}
let colors: ColorPalette = {
primary: "red"
seconda/*$*/
};

My proposal is that we do something similar to what we do in class elements, but maybe a little smarter.
We should continue to provide contextual completions, and also, those completions should automatically insert the , on the previous line.
Today, if you try to request completions after an object literal element that has no comma, you'll get no useful contextual completions.
My proposal is that we do something similar to what we do in class elements, but maybe a little smarter.
We should continue to provide contextual completions, and also, those completions should automatically insert the
,on the previous line.