Closed
Description
I ran into this while trying to implement TypeScript's ParseConfigFileHost
with an object spread, and I've been seeing this come up in my experience in general.
interface Something {
a?: number;
b: number;
c?: string;
d: string;
}
const thing: Something = {
/*$*/
}
Expected: Completions show b
, d
, a
, c
.
Actual: Completions show a
, b
, c
, d
.
Furthermore, already fulfilled properties should be even lower than optional properties.
interface Something {
a?: number;
b: number;
c?: string;
d: string;
}
const foo = {
a: 100,
b: 100,
}
const thing: Something = {
...foo,
/*$*/
}
Expected: d
, c
, a
, b
Actual: a
, b
, c
, d