SKCodeCompletion
open class SKCodeCompletion : Codable
                Represents a SourceKit code completion request that provides code completion suggestions.
- 
                  
                  
Undocumented
Declaration
Swift
public typealias Item = SKCodeCompletionItem 
- 
                  
                  
The value to use for
SKCodeCompletionSession.Options.requestStartin the next request when usingSKCodeCompletionSession.Options.requestLimit.Note
Only present forSKCodeCompletionSessionrequests.Declaration
Swift
public let nextRequestStart: Int? - 
                  
                  
The code completion items for the request.
Declaration
Swift
public var items: [Item] 
- 
                  
                  
Creates a new synchronous SourceKit code completion request.
Warning
The request is sent synchronously, so ensure this initializer is not called on the main thread.
Throws
A
SKError, if an error occurs.Declaration
Swift
public init(file: File, offset: Offset, compilerArguments: [String]) throwsParameters
fileThe source file.
offsetThe byte offset of the code completion point inside the source contents.
compilerArgumentsThe compiler arguments used to build the module (e.g
["-sdk", "/path/to/sdk"]). - 
                  
                  
Creates a new synchronous SourceKit code completion request.
Warning
The request is sent synchronously, so ensure this initializer is not called on the main thread.
Throws
A
SKError, if an error occurs.Declaration
Swift
public convenience init(file: File, offset: Offset, sdkPath: String, target: String? = nil) throwsParameters
fileThe source file.
offsetThe byte offset of the code completion point inside the source contents.
sdkPathThe path to the SDK to compile against.
targetThe target (triple) architecture to generate completions for (e.g.
"arm64-apple-ios12.1"). - 
                  
                  
Creates a new synchronous SourceKit code completion request.
Warning
The request is sent synchronously, so ensure this initializer is not called on the main thread.
Throws
A
SKError, if an error occurs.Declaration
Swift
public convenience init(filePath: String, offset: Offset, compilerArguments: [String]) throwsParameters
filePathThe absolute file path to the source file.
offsetThe byte offset of the code completion point inside the source contents.
compilerArgumentsThe compiler arguments used to build the module (e.g
["-sdk", "/path/to/sdk"]). - 
                  
                  
Creates a new synchronous SourceKit code completion request.
Warning
The request is sent synchronously, so ensure this initializer is not called on the main thread.
Throws
A
SKError, if an error occurs.Declaration
Swift
public convenience init(contents: String, offset: Offset, compilerArguments: [String]) throwsParameters
contentsThe source code contents.
offsetThe byte offset of the code completion point inside the source contents.
compilerArgumentsThe compiler arguments used to build the module (e.g
["-sdk", "/path/to/sdk"]). - 
                  
                  
Creates a new synchronous SourceKit code completion request.
Warning
The request is sent synchronously, so ensure this initializer is not called on the main thread.
Throws
A
SKError, if an error occurs.Declaration
Swift
public convenience init(filePath: String, offset: Offset, sdkPath: String, target: String? = nil) throwsParameters
filePathThe absolute file path to the source file.
offsetThe byte offset of the code completion point inside the source contents.
sdkPathThe path to the SDK to compile against.
targetThe target (triple) architecture to generate completions for (e.g.
"arm64-apple-ios12.1"). - 
                  
                  
Creates a new synchronous SourceKit code completion request.
Warning
The request is sent synchronously, so ensure this initializer is not called on the main thread.
Throws
A
SKError, if an error occurs.Declaration
Swift
public convenience init(contents: String, offset: Offset, sdkPath: String, target: String? = nil) throwsParameters
contentsThe source code contents.
offsetThe byte offset of the code completion point inside the source contents.
sdkPathThe path to the SDK to compile against.
targetThe target (triple) architecture to generate completions for (e.g.
"arm64-apple-ios12.1"). 
- 
                  
                  
Declaration
Swift
public static func == (lhs: SKCodeCompletion, rhs: SKCodeCompletion) -> Bool 
        SKCodeCompletion Class Reference