vscode: extract Type and Param hint cases of InlayHint at type level (needed further)
@@ -86,15 +86,21 @@ export interface Runnable {
export const runnables = request<RunnablesParams, Vec<Runnable>>("runnables");
-export const enum InlayKind {
+
+export type InlayHint = InlayHint.TypeHint | InlayHint.ParamHint;
+
+export namespace InlayHint {
+ export const enum Kind {
TypeHint = "TypeHint",
- ParameterHint = "ParameterHint",
+ ParamHint = "ParameterHint",
}
-export interface InlayHint {
+ interface Common {
range: lc.Range;
- kind: InlayKind;
label: string;
}
+ export type TypeHint = Common & { kind: Kind.TypeHint; }
+ export type ParamHint = Common & { kind: Kind.ParamHint; }
+}
export interface InlayHintsParams {
textDocument: lc.TextDocumentIdentifier;
}
