Open
Description
interface BorderOptions {
color?: string;
radius?: string;
}
interface ColorOptions {
background?: string;
foreground?: string;
}
export interface Options {
width?: number;
height?: number;
color?: ColorOptions;
border?: BorderOptions;
}
export function drawButton(options: Options) {
// ...
options;
}
In the latest TypeScript, if you expand out the quick info on the parameter options
(not the type - this is subtle) with more verbosity, you'll get
(parameter) options: {
width?: number | undefined;
height?: number | undefined;
color?: ColorOptions | undefined;
border?: BorderOptions;
}
Notice that color
and border
are inconsistent with what they display.
Similarly, if you switch Options
to be a type alias instead of an interface, you'll see the same inconsistency.
That's not the behavior of the playground, where hover verbosity isn't supported.