-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Type DisplayBugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion InfoBugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion Info
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.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Type DisplayBugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion InfoBugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion Info