Skip to content

Commit 37a7089

Browse files
committed
Support context value and hover message
1 parent e5ca31b commit 37a7089

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

src/server/protocol.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2496,6 +2496,8 @@ namespace ts.server.protocol {
24962496
triggerPosition: Location;
24972497
prefix?: string;
24982498
postfix?: string;
2499+
contextValue?: string;
2500+
hoverMessage?: string;
24992501
whitespaceBefore?: boolean;
25002502
whitespaceAfter?: boolean;
25012503
}

src/server/session.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,8 @@ namespace ts.server {
14321432
triggerPosition: scriptInfo.positionToLineOffset(hint.triggerPosition),
14331433
prefix: hint.prefix,
14341434
postfix: hint.postfix,
1435+
contextValue: hint.contextValue,
1436+
hoverMessage: hint.hoverMessage,
14351437
whitespaceBefore: hint.whitespaceBefore,
14361438
whitespaceAfter: hint.whitespaceAfter
14371439
}));

src/services/inlineHints.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ namespace ts.InlineHints {
66
triggerPosition: number;
77
prefix?: string;
88
postfix?: string;
9+
contextValue?: string;
10+
hoverMessage?: string;
911
whitespaceBefore?: boolean;
1012
whitespaceAfter?: boolean;
1113
}
@@ -89,6 +91,7 @@ namespace ts.InlineHints {
8991
range,
9092
triggerPosition: node.getStart(),
9193
postfix: ":",
94+
hoverMessage: text,
9295
whitespaceAfter: true,
9396
});
9497
}
@@ -99,6 +102,7 @@ namespace ts.InlineHints {
99102
range,
100103
triggerPosition: node.getStart(),
101104
prefix: ":",
105+
hoverMessage: text,
102106
whitespaceBefore: true,
103107
});
104108
}
@@ -109,6 +113,7 @@ namespace ts.InlineHints {
109113
range,
110114
triggerPosition: node.getStart(),
111115
prefix: "= ",
116+
hoverMessage: text,
112117
whitespaceBefore: true,
113118
});
114119
}

src/services/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,8 @@ namespace ts {
706706
triggerPosition: number;
707707
prefix?: string;
708708
postfix?: string;
709+
contextValue?: string;
710+
hoverMessage?: string;
709711
whitespaceBefore?: boolean;
710712
whitespaceAfter?: boolean;
711713
}

0 commit comments

Comments
 (0)