@@ -19,7 +19,7 @@ public struct InlayHint: ResponseType, Codable, Hashable {
1919 public let kind : InlayHintKind ?
2020
2121 /// The hint's text, e.g. a printed type
22- public let label : String
22+ public let label : InlayHintLabel
2323
2424 /// Optional text edits that are performed when accepting this inlay hint.
2525 public let textEdits : [ TextEdit ] ?
@@ -36,7 +36,7 @@ public struct InlayHint: ResponseType, Codable, Hashable {
3636 public init (
3737 position: Position ,
3838 kind: InlayHintKind ? = nil ,
39- label: String ,
39+ label: InlayHintLabel ,
4040 textEdits: [ TextEdit ] ? = nil ,
4141 tooltip: MarkupContent ? = nil ,
4242 paddingLeft: Bool ? = nil ,
@@ -93,6 +93,18 @@ public enum InlayHintLabel: Codable, Hashable {
9393 }
9494}
9595
96+ extension InlayHintLabel : ExpressibleByStringLiteral {
97+ public init ( stringLiteral value: String ) {
98+ self = . string( value)
99+ }
100+ }
101+
102+ extension InlayHintLabel : ExpressibleByStringInterpolation {
103+ public init ( stringInterpolation interpolation: DefaultStringInterpolation ) {
104+ self = . string( . init( stringInterpolation: interpolation) )
105+ }
106+ }
107+
96108/// A part of an interactive or composite inlay hint label.
97109public struct InlayHintLabelPart : Codable , Hashable {
98110 /// The value of this label part.
0 commit comments