File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Sources/SwiftDocC/DocumentationService/Convert/Symbol Link Resolution Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 99*/
1010
1111import Foundation
12+ public import SymbolKit
1213
1314/// A collection of API for link completion.
1415///
@@ -184,6 +185,15 @@ public enum LinkCompletionTools {
184185 self . parameterTypes = parameterTypes
185186 self . returnTypes = returnTypes
186187 }
188+
189+ public init ( symbol: SymbolGraph . Symbol ) {
190+ self . kind = symbol. kind. identifier. identifier
191+ self . symbolIDHash = Self . hash ( uniqueSymbolID: symbol. identifier. precise)
192+ if let signature = PathHierarchy . functionSignatureTypeNames ( for: symbol) {
193+ self . parameterTypes = signature. parameterTypeNames
194+ self . returnTypes = signature. returnTypeNames
195+ }
196+ }
187197
188198 /// Creates a hashed representation of a symbol's unique identifier.
189199 ///
You can’t perform that action at this time.
0 commit comments