Documentation
¶
Index ¶
- Variables
- func GeneratePipePath(name string) string
- func UnmarshalParams[T any](params json.Value) (*T, error)
- type APIFileChangeSummary
- type APIFileChanges
- type AsyncConn
- type CheckerNodeParams
- type CheckerSignatureParams
- type CheckerSymbolParams
- type CheckerTypeParams
- type CompletionEntryLabelDetailsResponse
- type CompletionEntryResponse
- type CompletionInfoResponse
- type ConfigFileResponse
- type Conn
- type DiagnosticResponse
- type DocumentIdentifier
- type GetBaseTypeOfLiteralTypeParams
- type GetCompletionsAtPositionParams
- type GetContextualTypeParams
- type GetDefaultProjectForFileParams
- type GetDiagnosticsParams
- type GetIntrinsicTypeParams
- type GetMemberInModuleExportsParams
- type GetNonNullableTypeParams
- type GetParameterTypeParams
- type GetProjectDiagnosticsParams
- type GetPropertyOfTypeParams
- type GetReferencedSymbolsForNodeParams
- type GetReferencesToSymbolInFileParams
- type GetResolvedSignatureParams
- type GetSignaturePropertyParams
- type GetSignatureUsagesParams
- type GetSignaturesOfTypeParams
- type GetSourceFileNamesParams
- type GetSourceFileParams
- type GetSymbolAtLocationParams
- type GetSymbolAtPositionParams
- type GetSymbolPropertyParams
- type GetSymbolsAtLocationsParams
- type GetSymbolsAtPositionsParams
- type GetTypeAtLocationParams
- type GetTypeAtLocationsParams
- type GetTypeAtPositionParams
- type GetTypeFromTypeNodeParams
- type GetTypeOfSymbolAtLocationParams
- type GetTypeOfSymbolParams
- type GetTypePropertyParams
- type GetTypesAtPositionsParams
- type GetTypesOfSymbolsParams
- type GetWidenedTypeParams
- type Handler
- type IndexInfoResponse
- type InitializeResponse
- type IsArrayLikeTypeParams
- type IsTypeAssignableToParams
- type JSDocTagInfo
- type JSONRPCProtocol
- func (p *JSONRPCProtocol) ReadMessage() (*Message, error)
- func (p *JSONRPCProtocol) WriteError(id *jsonrpc.ID, respErr *jsonrpc.ResponseError) error
- func (p *JSONRPCProtocol) WriteNotification(method string, params any) error
- func (p *JSONRPCProtocol) WriteRequest(id *jsonrpc.ID, method string, params any) error
- func (p *JSONRPCProtocol) WriteResponse(id *jsonrpc.ID, result any) error
- type Message
- type MessagePackProtocol
- func (p *MessagePackProtocol) ReadMessage() (*Message, error)
- func (p *MessagePackProtocol) WriteError(id *jsonrpc.ID, respErr *jsonrpc.ResponseError) error
- func (p *MessagePackProtocol) WriteNotification(method string, params any) error
- func (p *MessagePackProtocol) WriteRequest(id *jsonrpc.ID, method string, params any) error
- func (p *MessagePackProtocol) WriteResponse(id *jsonrpc.ID, result any) error
- type MessageType
- type Method
- type NodeHandle
- type ParseConfigFileParams
- type PipeTransport
- type PrintNodeParams
- type ProfileParams
- type ProfileResult
- type ProjectFileChanges
- type ProjectID
- type ProjectResponse
- type Protocol
- type RawBinary
- type ReferencedSymbolEntry
- type ReleaseParams
- type ResolveNameParams
- type Session
- func (s *Session) Close()
- func (s *Session) HandleNotification(ctx context.Context, method string, params json.Value) error
- func (s *Session) HandleRequest(ctx context.Context, method string, params json.Value) (any, error)
- func (s *Session) ID() string
- func (s *Session) ProjectSession() *project.Session
- type SessionOptions
- type SignatureID
- type SignatureResponse
- type SignatureToSignatureDeclarationParams
- type SignatureUsageResponse
- type SnapshotChanges
- type SnapshotID
- type SourceFileMetadata
- type SourceFileResponse
- type StdioServer
- type StdioServerOptions
- type StdioTransport
- type SymbolID
- type SymbolResponse
- type SyncConn
- type Transport
- type TypeID
- type TypePredicateResponse
- type TypeResponse
- type TypeToTypeNodeParams
- type UpdateSnapshotParams
- type UpdateSnapshotResponse
- type WellKnownSymbolsResponse
Constants ¶
This section is empty.
Variables ¶
var ( ErrConnClosed = errors.New("api: connection closed") ErrRequestTimeout = errors.New("api: request timeout") )
var ( ErrInvalidRequest = errors.New("api: invalid request") ErrClientError = errors.New("api: client error") )
Functions ¶
func GeneratePipePath ¶
GeneratePipePath returns a platform-appropriate pipe path for the given name.
Types ¶
type APIFileChangeSummary ¶
type APIFileChangeSummary struct {
Changed []DocumentIdentifier `json:"changed,omitempty"`
Created []DocumentIdentifier `json:"created,omitempty"`
Deleted []DocumentIdentifier `json:"deleted,omitempty"`
}
APIFileChangeSummary lists documents that have been changed, created, or deleted.
type APIFileChanges ¶
type APIFileChanges struct {
InvalidateAll bool `json:"invalidateAll,omitempty"`
Changed []DocumentIdentifier `json:"changed,omitempty"`
Created []DocumentIdentifier `json:"created,omitempty"`
Deleted []DocumentIdentifier `json:"deleted,omitempty"`
}
APIFileChanges describes file changes to apply when updating a snapshot. Either InvalidateAll is true (discard all caches) or Changed/Created/Deleted list individual documents.
type AsyncConn ¶
type AsyncConn struct {
// contains filtered or unexported fields
}
AsyncConn manages bidirectional JSON-RPC communication with async request handling. Each incoming request is handled in its own goroutine, allowing concurrent processing. This is the standard implementation for LSP-style JSON-RPC protocols.
func NewAsyncConn ¶
func NewAsyncConn(rwc io.ReadWriteCloser, handler Handler) *AsyncConn
NewAsyncConn creates a new async connection with the given transport and handler. It uses JSONRPCProtocol (LSP-style Content-Length framing) by default.
func NewAsyncConnWithProtocol ¶
func NewAsyncConnWithProtocol(rwc io.ReadWriteCloser, protocol Protocol, handler Handler) *AsyncConn
NewAsyncConnWithProtocol creates a new async connection with a custom protocol.
func (*AsyncConn) Run ¶
Run starts processing messages on the connection. It blocks until the context is cancelled or an error occurs.
func (*AsyncConn) SetCollectTiming ¶
SetCollectTiming enables or disables per-request server processing-time measurement. When enabled, the connection accumulates timing that clients can retrieve via a getServerTiming request.
type CheckerNodeParams ¶
type CheckerNodeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Location NodeHandle `json:"location"`
}
CheckerNodeParams are parameters for checker methods that operate on a node location.
type CheckerSignatureParams ¶
type CheckerSignatureParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Signature SignatureID `json:"signature"`
}
CheckerSignatureParams are parameters for checker methods that operate on a signature.
type CheckerSymbolParams ¶
type CheckerSymbolParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Symbol SymbolID `json:"symbol"`
}
CheckerSymbolParams are parameters for checker methods that operate on a symbol.
type CheckerTypeParams ¶
type CheckerTypeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Type TypeID `json:"type"`
}
CheckerTypeParams are parameters for checker methods that operate on a type.
type CompletionEntryLabelDetailsResponse ¶
type CompletionEntryLabelDetailsResponse struct {
Detail *string `json:"detail,omitempty"`
Description *string `json:"description,omitempty"`
}
CompletionEntryLabelDetailsResponse holds additional label display text for a completion entry.
type CompletionEntryResponse ¶
type CompletionEntryResponse struct {
Name string `json:"name"`
Kind uint32 `json:"kind,omitempty"`
SortText *string `json:"sortText,omitempty"`
InsertText *string `json:"insertText,omitempty"`
FilterText *string `json:"filterText,omitempty"`
Detail *string `json:"detail,omitempty"`
LabelDetails *CompletionEntryLabelDetailsResponse `json:"labelDetails,omitempty"`
Symbol *SymbolResponse `json:"symbol,omitempty"`
}
CompletionEntryResponse represents a single completion item.
type CompletionInfoResponse ¶
type CompletionInfoResponse struct {
IsIncomplete bool `json:"isIncomplete"`
Entries []*CompletionEntryResponse `json:"entries"`
}
CompletionInfoResponse wraps a list of completion entries.
type ConfigFileResponse ¶
type ConfigFileResponse struct {
FileNames []string `json:"fileNames"`
Options *core.CompilerOptions `json:"options"`
}
type Conn ¶
type Conn interface {
// Run starts processing messages on the connection.
// It blocks until the context is cancelled or an error occurs.
Run(ctx context.Context) error
// Call sends a request to the client and waits for a response.
Call(ctx context.Context, method string, params any) (json.Value, error)
// Notify sends a notification to the client (no response expected).
Notify(ctx context.Context, method string, params any) error
}
Conn represents a bidirectional connection for API communication.
type DiagnosticResponse ¶
type DiagnosticResponse struct {
// FileName is the path of the file this diagnostic belongs to, if any.
FileName string `json:"fileName,omitempty"`
// Pos is the start position of the diagnostic in the source file.
Pos int `json:"pos"`
// End is the end position of the diagnostic in the source file.
End int `json:"end"`
// Code is the diagnostic error code.
Code int32 `json:"code"`
// Category is the diagnostic category (error, warning, suggestion, message).
Category diagnostics.Category `json:"category"`
// Text is the localized diagnostic message text.
Text string `json:"text"`
// ReportsUnnecessary indicates this diagnostic highlights unnecessary code.
ReportsUnnecessary bool `json:"reportsUnnecessary,omitzero"`
// ReportsDeprecated indicates this diagnostic highlights deprecated code.
ReportsDeprecated bool `json:"reportsDeprecated,omitzero"`
// MessageChain contains chained diagnostic messages, if any.
MessageChain []*DiagnosticResponse `json:"messageChain,omitempty"`
// RelatedInformation contains related diagnostic information, if any.
RelatedInformation []*DiagnosticResponse `json:"relatedInformation,omitempty"`
}
DiagnosticResponse is the API response for a single diagnostic.
func NewDiagnosticResponse ¶
func NewDiagnosticResponse(d *ast.Diagnostic) *DiagnosticResponse
NewDiagnosticResponse converts an ast.Diagnostic to a DiagnosticResponse.
func NewDiagnosticResponses ¶
func NewDiagnosticResponses(diags []*ast.Diagnostic) []*DiagnosticResponse
NewDiagnosticResponses converts a slice of ast.Diagnostics to DiagnosticResponses.
type DocumentIdentifier ¶
type DocumentIdentifier struct {
FileName string `json:"fileName,omitempty"`
URI lsproto.DocumentUri `json:"uri,omitempty"`
}
DocumentIdentifier identifies a document by either a file name (plain string) or a URI object. On the wire it is string | { uri: string }.
func (DocumentIdentifier) String ¶
func (d DocumentIdentifier) String() string
func (DocumentIdentifier) ToAbsoluteFileName ¶
func (d DocumentIdentifier) ToAbsoluteFileName(cwd string) string
func (DocumentIdentifier) ToFileName ¶
func (d DocumentIdentifier) ToFileName() string
func (DocumentIdentifier) ToURI ¶
func (d DocumentIdentifier) ToURI(cwd string) lsproto.DocumentUri
ToURI returns the document URI for this identifier. An explicitly provided URI is returned as-is; a file name is first normalized to an absolute path against cwd before being converted to a URI.
func (*DocumentIdentifier) UnmarshalJSONFrom ¶
func (d *DocumentIdentifier) UnmarshalJSONFrom(dec *json.Decoder) error
type GetBaseTypeOfLiteralTypeParams ¶
type GetBaseTypeOfLiteralTypeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Type TypeID `json:"type"`
}
GetBaseTypeOfLiteralTypeParams returns the base type of a literal type.
type GetCompletionsAtPositionParams ¶
type GetCompletionsAtPositionParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
File DocumentIdentifier `json:"file"`
Position uint32 `json:"position"`
TriggerCharacter *string `json:"triggerCharacter,omitempty"`
IncludeSymbol bool `json:"includeSymbol,omitempty"`
}
GetCompletionsAtPositionParams are the parameters for the getCompletionsAtPosition method.
type GetContextualTypeParams ¶
type GetContextualTypeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Location NodeHandle `json:"location"`
}
GetContextualTypeParams returns the contextual type for a node.
type GetDefaultProjectForFileParams ¶
type GetDefaultProjectForFileParams struct {
Snapshot SnapshotID `json:"snapshot"`
File DocumentIdentifier `json:"file"`
}
type GetDiagnosticsParams ¶
type GetDiagnosticsParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
File *DocumentIdentifier `json:"file,omitempty"`
}
GetDiagnosticsParams are parameters for per-file diagnostic methods.
type GetIntrinsicTypeParams ¶
type GetIntrinsicTypeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
}
GetIntrinsicTypeParams is used for intrinsic type getters (anyType, stringType, etc.).
type GetMemberInModuleExportsParams ¶
type GetMemberInModuleExportsParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Symbol SymbolID `json:"symbol"`
Name string `json:"name"`
}
GetMemberInModuleExportsParams are parameters for getMemberInModuleExports.
type GetNonNullableTypeParams ¶
type GetNonNullableTypeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Type TypeID `json:"type"`
}
GetNonNullableTypeParams are the parameters for the getNonNullableType method.
type GetParameterTypeParams ¶
type GetParameterTypeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Signature SignatureID `json:"signature"`
Index int32 `json:"index"`
}
GetParameterTypeParams are the parameters for the getParameterType method.
type GetProjectDiagnosticsParams ¶
type GetProjectDiagnosticsParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
}
GetProjectDiagnosticsParams are parameters for project-wide diagnostic methods.
type GetPropertyOfTypeParams ¶
type GetPropertyOfTypeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Type TypeID `json:"type"`
Name string `json:"name"`
}
GetPropertyOfTypeParams are parameters for getPropertyOfType (a named property of a type).
type GetReferencedSymbolsForNodeParams ¶
type GetReferencedSymbolsForNodeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Node NodeHandle `json:"node"`
Position int `json:"position"`
}
GetReferencedSymbolsForNodeParams are the parameters for the getReferencedSymbolsForNode method.
type GetReferencesToSymbolInFileParams ¶
type GetReferencesToSymbolInFileParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
File DocumentIdentifier `json:"file"`
Symbol SymbolID `json:"symbol"`
}
GetReferencesToSymbolInFileParams are the parameters for the getReferencesToSymbolInFile method.
type GetResolvedSignatureParams ¶
type GetResolvedSignatureParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Location NodeHandle `json:"location"`
}
type GetSignaturePropertyParams ¶
type GetSignaturePropertyParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Signature SignatureID `json:"objectId"`
}
GetSignaturePropertyParams is used for all signature sub-property endpoints.
type GetSignatureUsagesParams ¶
type GetSignatureUsagesParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
SignatureDecl NodeHandle `json:"signatureDecl"`
}
GetSignatureUsagesParams are the parameters for the getSignatureUsages method.
type GetSignaturesOfTypeParams ¶
type GetSignaturesOfTypeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Type TypeID `json:"type"`
Kind int32 `json:"kind"`
}
type GetSourceFileNamesParams ¶
type GetSourceFileNamesParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
}
type GetSourceFileParams ¶
type GetSourceFileParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
File DocumentIdentifier `json:"file"`
}
type GetSymbolAtLocationParams ¶
type GetSymbolAtLocationParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Location NodeHandle `json:"location"`
}
type GetSymbolAtPositionParams ¶
type GetSymbolAtPositionParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
File DocumentIdentifier `json:"file"`
Position uint32 `json:"position"`
}
type GetSymbolPropertyParams ¶
type GetSymbolPropertyParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Symbol SymbolID `json:"objectId"`
}
GetSymbolPropertyParams is used for all symbol sub-property endpoints.
type GetSymbolsAtLocationsParams ¶
type GetSymbolsAtLocationsParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Locations []NodeHandle `json:"locations"`
}
type GetSymbolsAtPositionsParams ¶
type GetSymbolsAtPositionsParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
File DocumentIdentifier `json:"file"`
Positions []uint32 `json:"positions"`
}
type GetTypeAtLocationParams ¶
type GetTypeAtLocationParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Location NodeHandle `json:"location"`
}
type GetTypeAtLocationsParams ¶
type GetTypeAtLocationsParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Locations []NodeHandle `json:"locations"`
}
type GetTypeAtPositionParams ¶
type GetTypeAtPositionParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
File DocumentIdentifier `json:"file"`
Position uint32 `json:"position"`
}
type GetTypeFromTypeNodeParams ¶
type GetTypeFromTypeNodeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Location NodeHandle `json:"location"`
}
GetTypeFromTypeNodeParams are the parameters for the getTypeFromTypeNode method.
type GetTypeOfSymbolAtLocationParams ¶
type GetTypeOfSymbolAtLocationParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Symbol SymbolID `json:"symbol"`
Location NodeHandle `json:"location"`
}
GetTypeOfSymbolAtLocationParams returns the narrowed type of a symbol at a specific location.
type GetTypeOfSymbolParams ¶
type GetTypeOfSymbolParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Symbol SymbolID `json:"symbol"`
}
type GetTypePropertyParams ¶
type GetTypePropertyParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Type TypeID `json:"objectId"`
}
GetTypePropertyParams is used for all type sub-property endpoints.
type GetTypesAtPositionsParams ¶
type GetTypesAtPositionsParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
File DocumentIdentifier `json:"file"`
Positions []uint32 `json:"positions"`
}
type GetTypesOfSymbolsParams ¶
type GetTypesOfSymbolsParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Symbols []SymbolID `json:"symbols"`
}
type GetWidenedTypeParams ¶
type GetWidenedTypeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Type TypeID `json:"type"`
}
GetWidenedTypeParams are the parameters for the getWidenedType method.
type Handler ¶
type Handler interface {
// HandleRequest handles an incoming request and returns a result or error.
HandleRequest(ctx context.Context, method string, params json.Value) (any, error)
// HandleNotification handles an incoming notification.
HandleNotification(ctx context.Context, method string, params json.Value) error
}
Handler processes incoming API requests and notifications.
type IndexInfoResponse ¶
type IndexInfoResponse struct {
KeyType TypeResponse `json:"keyType"`
ValueType TypeResponse `json:"valueType"`
IsReadonly bool `json:"isReadonly,omitempty"`
Declaration NodeHandle `json:"declaration,omitempty"`
}
IndexInfoResponse represents a single index signature.
type InitializeResponse ¶
type InitializeResponse struct {
// UseCaseSensitiveFileNames indicates whether the host file system is case-sensitive.
UseCaseSensitiveFileNames bool `json:"useCaseSensitiveFileNames"`
// CurrentDirectory is the server's current working directory.
CurrentDirectory string `json:"currentDirectory"`
}
InitializeResponse is returned by the initialize method.
type IsArrayLikeTypeParams ¶
type IsArrayLikeTypeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Type TypeID `json:"type"`
}
IsArrayLikeTypeParams checks whether a type is array-like.
type IsTypeAssignableToParams ¶
type IsTypeAssignableToParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Source TypeID `json:"source"`
Target TypeID `json:"target"`
}
IsTypeAssignableToParams checks assignability between two types.
type JSDocTagInfo ¶
JSDocTagInfo is a single JSDoc tag, mirroring Strada's JSDocTagInfo but with the tag text rendered as a plain string rather than SymbolDisplayPart[].
type JSONRPCProtocol ¶
type JSONRPCProtocol struct {
// contains filtered or unexported fields
}
JSONRPCProtocol implements the Protocol interface using JSON-RPC 2.0 with the LSP base protocol framing (Content-Length headers).
func NewJSONRPCProtocol ¶
func NewJSONRPCProtocol(rw io.ReadWriter) *JSONRPCProtocol
NewJSONRPCProtocol creates a new JSON-RPC protocol handler.
func (*JSONRPCProtocol) ReadMessage ¶
func (p *JSONRPCProtocol) ReadMessage() (*Message, error)
ReadMessage implements Protocol.
func (*JSONRPCProtocol) WriteError ¶
func (p *JSONRPCProtocol) WriteError(id *jsonrpc.ID, respErr *jsonrpc.ResponseError) error
WriteError implements Protocol.
func (*JSONRPCProtocol) WriteNotification ¶
func (p *JSONRPCProtocol) WriteNotification(method string, params any) error
WriteNotification implements Protocol.
func (*JSONRPCProtocol) WriteRequest ¶
WriteRequest implements Protocol.
func (*JSONRPCProtocol) WriteResponse ¶
func (p *JSONRPCProtocol) WriteResponse(id *jsonrpc.ID, result any) error
WriteResponse implements Protocol.
type MessagePackProtocol ¶
type MessagePackProtocol struct {
// contains filtered or unexported fields
}
MessagePackProtocol implements the Protocol interface using a custom msgpack-based tuple format: [MessageType, method, payload].
func NewMessagePackProtocol ¶
func NewMessagePackProtocol(rw io.ReadWriter) *MessagePackProtocol
NewMessagePackProtocol creates a new msgpack protocol handler.
func (*MessagePackProtocol) ReadMessage ¶
func (p *MessagePackProtocol) ReadMessage() (*Message, error)
ReadMessage implements Protocol.
func (*MessagePackProtocol) WriteError ¶
func (p *MessagePackProtocol) WriteError(id *jsonrpc.ID, respErr *jsonrpc.ResponseError) error
WriteError implements Protocol.
func (*MessagePackProtocol) WriteNotification ¶
func (p *MessagePackProtocol) WriteNotification(method string, params any) error
WriteNotification implements Protocol.
func (*MessagePackProtocol) WriteRequest ¶
WriteRequest implements Protocol.
func (*MessagePackProtocol) WriteResponse ¶
func (p *MessagePackProtocol) WriteResponse(id *jsonrpc.ID, result any) error
WriteResponse implements Protocol.
type MessageType ¶
type MessageType uint8
MessageType represents the type of message in the msgpack protocol.
const ( MessageTypeUnknown MessageType = iota MessageTypeRequest MessageTypeCallResponse MessageTypeCallError MessageTypeResponse MessageTypeError MessageTypeCall )
func (MessageType) IsValid ¶
func (m MessageType) IsValid() bool
func (MessageType) String ¶
func (i MessageType) String() string
type Method ¶
type Method string
const ( MethodRelease Method = "release" // MethodGetServerTiming retrieves the server's collected per-request // processing-time totals and recent-request ring buffer. It is handled by // the connection itself (not the session) and is not recorded in the timing // it reports. MethodGetServerTiming Method = "getServerTiming" // MethodResetServerTiming clears the server's collected timing totals and // recent-request ring buffer. Like MethodGetServerTiming, it is handled by // the connection itself and is not recorded. MethodResetServerTiming Method = "resetServerTiming" MethodInitialize Method = "initialize" MethodUpdateSnapshot Method = "updateSnapshot" MethodParseConfigFile Method = "parseConfigFile" MethodGetDefaultProjectForFile Method = "getDefaultProjectForFile" MethodGetSymbolAtPosition Method = "getSymbolAtPosition" MethodGetSymbolsAtPositions Method = "getSymbolsAtPositions" MethodGetSymbolAtLocation Method = "getSymbolAtLocation" MethodGetSymbolsAtLocations Method = "getSymbolsAtLocations" MethodGetTypeOfSymbol Method = "getTypeOfSymbol" MethodGetTypesOfSymbols Method = "getTypesOfSymbols" MethodGetDeclaredTypeOfSymbol Method = "getDeclaredTypeOfSymbol" MethodGetSourceFile Method = "getSourceFile" MethodGetSourceFileNames Method = "getSourceFileNames" MethodGetSourceFileMetadata Method = "getSourceFileMetadata" MethodResolveName Method = "resolveName" MethodGetSignaturesOfType Method = "getSignaturesOfType" MethodGetResolvedSignature Method = "getResolvedSignature" MethodGetTypeAtLocation Method = "getTypeAtLocation" MethodGetTypeAtLocations Method = "getTypeAtLocations" MethodGetTypeAtPosition Method = "getTypeAtPosition" MethodGetTypesAtPositions Method = "getTypesAtPositions" // Symbol sub-property methods MethodGetParentOfSymbol Method = "getParentOfSymbol" MethodGetMembersOfSymbol Method = "getMembersOfSymbol" MethodGetExportsOfSymbol Method = "getExportsOfSymbol" MethodGetExportSymbolOfSymbol Method = "getExportSymbolOfSymbol" // Type sub-property methods MethodGetSymbolOfType Method = "getSymbolOfType" MethodGetTargetOfType Method = "getTargetOfType" MethodGetFreshTypeOfType Method = "getFreshTypeOfType" MethodGetRegularTypeOfType Method = "getRegularTypeOfType" MethodGetTypesOfType Method = "getTypesOfType" MethodGetTypeParametersOfType Method = "getTypeParametersOfType" MethodGetOuterTypeParametersOfType Method = "getOuterTypeParametersOfType" MethodGetLocalTypeParametersOfType Method = "getLocalTypeParametersOfType" MethodGetAliasTypeArgumentsOfType Method = "getAliasTypeArgumentsOfType" MethodGetAliasSymbolOfType Method = "getAliasSymbolOfType" MethodGetObjectTypeOfType Method = "getObjectTypeOfType" MethodGetIndexTypeOfType Method = "getIndexTypeOfType" MethodGetCheckTypeOfType Method = "getCheckTypeOfType" MethodGetExtendsTypeOfType Method = "getExtendsTypeOfType" MethodGetBaseTypeOfType Method = "getBaseTypeOfType" MethodGetConstraintOfType Method = "getConstraintOfType" // Signature sub-property methods MethodGetTypeParametersOfSignature Method = "getTypeParametersOfSignature" MethodGetParametersOfSignature Method = "getParametersOfSignature" MethodGetThisParameterOfSignature Method = "getThisParameterOfSignature" MethodGetTargetOfSignature Method = "getTargetOfSignature" // Checker methods MethodGetContextualType Method = "getContextualType" MethodGetBaseTypeOfLiteralType Method = "getBaseTypeOfLiteralType" MethodGetNonNullableType Method = "getNonNullableType" MethodGetTypeFromTypeNode Method = "getTypeFromTypeNode" MethodGetWidenedType Method = "getWidenedType" MethodGetParameterType Method = "getParameterType" MethodIsArrayLikeType Method = "isArrayLikeType" MethodIsTypeAssignableTo Method = "isTypeAssignableTo" MethodGetShorthandAssignmentValueSymbol Method = "getShorthandAssignmentValueSymbol" MethodGetTypeOfSymbolAtLocation Method = "getTypeOfSymbolAtLocation" MethodTypeToTypeNode Method = "typeToTypeNode" MethodSignatureToSignatureDeclaration Method = "signatureToSignatureDeclaration" MethodTypeToString Method = "typeToString" MethodIsContextSensitive Method = "isContextSensitive" MethodGetReturnTypeOfSignature Method = "getReturnTypeOfSignature" MethodGetRestTypeOfSignature Method = "getRestTypeOfSignature" MethodGetTypePredicateOfSignature Method = "getTypePredicateOfSignature" MethodGetBaseTypes Method = "getBaseTypes" MethodGetPropertiesOfType Method = "getPropertiesOfType" MethodGetApparentType Method = "getApparentType" MethodGetPropertyOfType Method = "getPropertyOfType" MethodGetIndexInfosOfType Method = "getIndexInfosOfType" MethodGetConstraintOfTypeParameter Method = "getConstraintOfTypeParameter" MethodGetBaseConstraintOfType Method = "getBaseConstraintOfType" MethodGetTypeArguments Method = "getTypeArguments" MethodGetTrueTypeOfConditionalType Method = "getTrueTypeOfConditionalType" MethodGetFalseTypeOfConditionalType Method = "getFalseTypeOfConditionalType" MethodGetConstantValue Method = "getConstantValue" MethodGetSignatureFromDeclaration Method = "getSignatureFromDeclaration" MethodGetExportSpecifierLocalTarget Method = "getExportSpecifierLocalTargetSymbol" MethodGetAliasedSymbol Method = "getAliasedSymbol" MethodGetImmediateAliasedSymbol Method = "getImmediateAliasedSymbol" MethodGetExportsOfModule Method = "getExportsOfModule" MethodGetMemberInModuleExports Method = "getMemberInModuleExports" MethodGetJSDocTags Method = "getJsDocTags" MethodGetDocumentationComment Method = "getDocumentationComment" MethodIsArrayType Method = "isArrayType" MethodIsTupleType Method = "isTupleType" // Reference methods MethodGetReferencesToSymbolInFile Method = "getReferencesToSymbolInFile" MethodGetReferencedSymbolsForNode Method = "getReferencedSymbolsForNode" MethodGetSignatureUsages Method = "getSignatureUsages" // Language service methods MethodGetCompletionsAtPosition Method = "getCompletionsAtPosition" // Diagnostic methods MethodGetSyntacticDiagnostics Method = "getSyntacticDiagnostics" MethodGetBindDiagnostics Method = "getBindDiagnostics" MethodGetSemanticDiagnostics Method = "getSemanticDiagnostics" MethodGetSuggestionDiagnostics Method = "getSuggestionDiagnostics" MethodGetDeclarationDiagnostics Method = "getDeclarationDiagnostics" MethodGetProgramDiagnostics Method = "getProgramDiagnostics" MethodGetGlobalDiagnostics Method = "getGlobalDiagnostics" MethodGetConfigFileParsingDiagnostics Method = "getConfigFileParsingDiagnostics" // Emitter methods MethodPrintNode Method = "printNode" // Intrinsic type getters MethodGetAnyType Method = "getAnyType" MethodGetStringType Method = "getStringType" MethodGetNumberType Method = "getNumberType" MethodGetBooleanType Method = "getBooleanType" MethodGetVoidType Method = "getVoidType" MethodGetUndefinedType Method = "getUndefinedType" MethodGetNullType Method = "getNullType" MethodGetNeverType Method = "getNeverType" MethodGetUnknownType Method = "getUnknownType" MethodGetBigIntType Method = "getBigIntType" MethodGetESSymbolType Method = "getESSymbolType" // Well-known per-checker symbols MethodGetWellKnownSymbols Method = "getWellKnownSymbols" // Profiling methods MethodStartCPUProfile Method = "startCPUProfile" MethodStopCPUProfile Method = "stopCPUProfile" MethodSaveHeapProfile Method = "saveHeapProfile" )
type NodeHandle ¶
type NodeHandle string
type ParseConfigFileParams ¶
type ParseConfigFileParams struct {
File DocumentIdentifier `json:"file"`
}
type PipeTransport ¶
type PipeTransport struct {
// contains filtered or unexported fields
}
PipeTransport accepts connections on a Unix domain socket or Windows named pipe.
func NewPipeTransport ¶
func NewPipeTransport(path string) (*PipeTransport, error)
NewPipeTransport creates a new transport listening on the given path. On Unix, this creates a Unix domain socket. On Windows, this creates a named pipe.
func (*PipeTransport) Accept ¶
func (t *PipeTransport) Accept() (io.ReadWriteCloser, error)
Accept implements Transport.
func (*PipeTransport) Path ¶
func (t *PipeTransport) Path() string
Path returns the path of the pipe/socket.
type PrintNodeParams ¶
type PrintNodeParams struct {
Data string `json:"data"` // base64-encoded binary AST data
PreserveSourceNewlines bool `json:"preserveSourceNewlines,omitempty"`
NeverAsciiEscape bool `json:"neverAsciiEscape,omitempty"`
TerminateUnterminatedLiterals bool `json:"terminateUnterminatedLiterals,omitempty"`
}
PrintNodeParams are the parameters for the printNode method.
type ProfileParams ¶
type ProfileParams struct {
Dir string `json:"dir"`
}
type ProfileResult ¶
type ProfileResult struct {
File string `json:"file"`
}
type ProjectFileChanges ¶
type ProjectFileChanges struct {
// ChangedFiles lists source file paths whose content differs.
ChangedFiles []tspath.Path `json:"changedFiles,omitempty"`
// DeletedFiles lists source file paths removed from the project's program.
DeletedFiles []tspath.Path `json:"deletedFiles,omitempty"`
}
ProjectFileChanges describes what source files changed within a single project.
type ProjectResponse ¶
type ProjectResponse struct {
Id ProjectID `json:"id"`
ConfigFileName string `json:"configFileName"`
RootFiles []string `json:"rootFiles"`
CompilerOptions *core.CompilerOptions `json:"compilerOptions"`
}
func NewProjectResponse ¶
func NewProjectResponse(p *project.Project) *ProjectResponse
type Protocol ¶
type Protocol interface {
// ReadMessage reads the next message from the connection.
ReadMessage() (*Message, error)
// WriteRequest writes a request message.
WriteRequest(id *jsonrpc.ID, method string, params any) error
// WriteNotification writes a notification message (no ID).
WriteNotification(method string, params any) error
// WriteResponse writes a successful response.
WriteResponse(id *jsonrpc.ID, result any) error
// WriteError writes an error response.
WriteError(id *jsonrpc.ID, err *jsonrpc.ResponseError) error
}
Protocol defines the interface for reading and writing API messages.
type RawBinary ¶
type RawBinary []byte
RawBinary is a marker type for binary data that should be written directly by MessagePackProtocol instead of being JSON-encoded.
type ReferencedSymbolEntry ¶
type ReferencedSymbolEntry struct {
Definition NodeHandle `json:"definition"`
Symbol *SymbolResponse `json:"symbol,omitempty"`
References []NodeHandle `json:"references"`
}
ReferencedSymbolEntry represents a symbol definition and its references.
type ReleaseParams ¶
type ReleaseParams struct {
Snapshot SnapshotID `json:"snapshot"`
}
ReleaseParams are the parameters for the release method.
type ResolveNameParams ¶
type ResolveNameParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Name string `json:"name"`
Location NodeHandle `json:"location,omitempty"` // Optional: node handle for location context
File *DocumentIdentifier `json:"file,omitempty"` // Optional: file for location context (alternative to Location)
Position *uint32 `json:"position,omitempty"` // Optional: position in file for location context (with File)
Meaning uint32 `json:"meaning"` // SymbolFlags for what kind of symbol to find
ExcludeGlobals bool `json:"excludeGlobals,omitempty"` // Whether to exclude global symbols
}
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session represents an API session that provides programmatic access to TypeScript language services through the LSP server. It implements the Handler interface to process incoming API requests. The session supports multiple active snapshots, each with their own symbol and type registries for maintaining object identity.
func NewSession ¶
func NewSession(projectSession *project.Session, options *SessionOptions) *Session
NewSession creates a new API session with the given project session.
func (*Session) Close ¶
func (s *Session) Close()
Close closes the session and releases all active snapshots, regardless of their ref counts.
func (*Session) HandleNotification ¶
HandleNotification implements Handler.
func (*Session) HandleRequest ¶
HandleRequest implements Handler.
func (*Session) ProjectSession ¶
ProjectSession returns the underlying project session.
type SessionOptions ¶
type SessionOptions struct {
// UseBinaryResponses enables binary responses for msgpack protocol.
UseBinaryResponses bool
}
SessionOptions configures an API session.
type SignatureID ¶
type SignatureID uint64
func SignatureHandle ¶
func SignatureHandle(sig *checker.Signature) SignatureID
type SignatureResponse ¶
type SignatureResponse struct {
Id SignatureID `json:"id"`
Flags uint32 `json:"flags"`
Declaration NodeHandle `json:"declaration,omitempty"`
TypeParameters []TypeID `json:"typeParameters,omitempty"`
Parameters []SymbolID `json:"parameters,omitempty"`
ThisParameter SymbolID `json:"thisParameter,omitzero"`
Target SignatureID `json:"target,omitzero"`
}
type SignatureToSignatureDeclarationParams ¶
type SignatureToSignatureDeclarationParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Signature SignatureID `json:"signature"`
Kind int32 `json:"kind"`
Location NodeHandle `json:"location,omitempty"`
Flags int32 `json:"flags,omitempty"`
}
SignatureToSignatureDeclarationParams are the parameters for the signatureToSignatureDeclaration method.
type SignatureUsageResponse ¶
type SignatureUsageResponse struct {
Name NodeHandle `json:"name"`
Call NodeHandle `json:"call,omitempty"`
}
SignatureUsageResponse represents a single usage of a signature as a name-call pair.
type SnapshotChanges ¶
type SnapshotChanges struct {
// ChangedProjects maps project handles to the file changes within that project.
// Projects not listed here (and not in RemovedProjects) are unchanged.
ChangedProjects map[ProjectID]*ProjectFileChanges `json:"changedProjects,omitempty"`
// RemovedProjects lists project handles that were present in the previous
// snapshot but absent from the new one.
RemovedProjects []ProjectID `json:"removedProjects,omitempty"`
}
SnapshotChanges describes what changed between the previous latest snapshot and the newly created snapshot. Changes are reported per-project so clients can track cache refs at the (snapshot, project) level.
type SnapshotID ¶
type SnapshotID uint64
type SourceFileMetadata ¶
type SourceFileMetadata struct {
IsDefaultLibrary bool `json:"isDefaultLibrary"`
IsFromExternalLibrary bool `json:"isFromExternalLibrary"`
PackageJsonType string `json:"packageJsonType"`
PackageJsonDirectory string `json:"packageJsonDirectory"`
ImpliedNodeFormat core.ResolutionMode `json:"impliedNodeFormat"`
}
SourceFileMetadata carries program-stored metadata about a single source file.
type SourceFileResponse ¶
type SourceFileResponse struct {
Data string `json:"data"`
}
SourceFileResponse contains the binary-encoded AST data for a source file. The Data field is base64-encoded binary data in the encoder's format.
type StdioServer ¶
type StdioServer struct {
// contains filtered or unexported fields
}
StdioServer runs an API session over STDIO using MessagePack protocol. This is the entry point for the synchronous STDIO-based API used by native TypeScript tooling integration.
func NewStdioServer ¶
func NewStdioServer(options *StdioServerOptions) *StdioServer
NewStdioServer creates a new STDIO-based API server.
type StdioServerOptions ¶
type StdioServerOptions struct {
In io.ReadCloser
Out io.WriteCloser
Err io.Writer
Cwd string
DefaultLibraryPath string
// PipePath, if set, listens on a named pipe (Windows) or Unix domain
// socket instead of using In/Out for communication.
PipePath string
// Callbacks specifies which filesystem operations should be delegated
// to the client (e.g., "readFile", "fileExists"). Empty means no callbacks.
Callbacks []string
// Async enables JSON-RPC protocol with async connection handling.
// When false (default), uses MessagePack protocol with sync connection.
Async bool
// CollectTiming enables per-request server processing-time measurement.
// When enabled, the server accumulates each request's processing time into
// running totals and a recent-request ring buffer. Response messages are
// left unchanged; the client folds this data into its own timing snapshot
// on demand via getServerTiming / resetServerTiming requests.
CollectTiming bool
}
StdioServerOptions configures the STDIO-based API server.
type StdioTransport ¶
type StdioTransport struct {
// contains filtered or unexported fields
}
StdioTransport wraps stdin/stdout as a single connection transport. It only accepts one connection.
func NewStdioTransport ¶
func NewStdioTransport(stdin io.ReadCloser, stdout io.WriteCloser) *StdioTransport
NewStdioTransport creates a transport using the given stdin/stdout.
func (*StdioTransport) Accept ¶
func (t *StdioTransport) Accept() (io.ReadWriteCloser, error)
Accept implements Transport.
type SymbolResponse ¶
type SymbolResponse struct {
Id SymbolID `json:"id"`
Project ProjectID `json:"project"`
Name string `json:"name"`
Flags uint32 `json:"flags"`
CheckFlags uint32 `json:"checkFlags"`
Declarations []NodeHandle `json:"declarations,omitempty"`
ValueDeclaration NodeHandle `json:"valueDeclaration,omitempty"`
Parent SymbolID `json:"parent,omitzero"`
ExportSymbol SymbolID `json:"exportSymbol,omitzero"`
}
type SyncConn ¶
type SyncConn struct {
// contains filtered or unexported fields
}
SyncConn manages bidirectional communication with synchronous request handling. Requests are handled one at a time inline, and outgoing calls are serialized.
func NewSyncConn ¶
func NewSyncConn(rwc io.ReadWriteCloser, protocol Protocol, handler Handler) *SyncConn
NewSyncConn creates a new sync connection with the given transport and handler.
func (*SyncConn) Call ¶
Call sends a request to the client and waits for a response. This method is safe to call from multiple goroutines - calls are serialized.
func (*SyncConn) Run ¶
Run starts processing messages on the connection. It blocks until the context is cancelled or an error occurs.
func (*SyncConn) SetCollectTiming ¶
SetCollectTiming enables or disables per-request server processing-time measurement. When enabled, the connection accumulates timing that clients can retrieve via a getServerTiming request.
type Transport ¶
type Transport interface {
// Accept waits for and returns the next connection.
Accept() (io.ReadWriteCloser, error)
// Close stops the transport from accepting new connections.
Close() error
}
Transport is an interface for accepting connections from API clients.
type TypePredicateResponse ¶
type TypePredicateResponse struct {
Kind int32 `json:"kind"`
ParameterIndex int32 `json:"parameterIndex"`
ParameterName string `json:"parameterName,omitempty"`
Type *TypeResponse `json:"type,omitempty"`
}
TypePredicateResponse is the response for getTypePredicateOfSignature.
type TypeResponse ¶
type TypeResponse struct {
Id TypeID `json:"id"`
Flags uint32 `json:"flags"`
ObjectFlags uint32 `json:"objectFlags,omitempty"`
// LiteralType data
Value any `json:"value"`
// ObjectType / TypeReference / StringMappingType / IndexType target
Target TypeID `json:"target,omitzero"`
// InterfaceType type parameters
TypeParameters []TypeID `json:"typeParameters,omitempty"`
OuterTypeParameters []TypeID `json:"outerTypeParameters,omitempty"`
LocalTypeParameters []TypeID `json:"localTypeParameters,omitempty"`
// TupleType data
ElementFlags []checker.ElementFlags `json:"elementFlags,omitempty"`
FixedLength *int `json:"fixedLength,omitempty"`
TupleReadonly *bool `json:"readonly,omitempty"`
// IndexedAccessType data
ObjectType TypeID `json:"objectType,omitzero"`
IndexType TypeID `json:"indexType,omitzero"`
// ConditionalType data
CheckType TypeID `json:"checkType,omitzero"`
ExtendsType TypeID `json:"extendsType,omitzero"`
// SubstitutionType data
BaseType TypeID `json:"baseType,omitzero"`
SubstConstraint TypeID `json:"substConstraint,omitzero"`
// TemplateLiteralType text segments
Texts []string `json:"texts,omitempty"`
// FreshableType data (LiteralType and computed enum types)
FreshType TypeID `json:"freshType,omitzero"`
RegularType TypeID `json:"regularType,omitzero"`
// TypeParameter data
IsThisType bool `json:"isThisType,omitempty"`
// IntrinsicType data
IntrinsicName string `json:"intrinsicName,omitempty"`
// TypeAlias data
AliasTypeArguments []TypeID `json:"aliasTypeArguments,omitempty"`
AliasSymbol SymbolID `json:"aliasSymbol,omitzero"`
// Symbol associated with structured types
Symbol SymbolID `json:"symbol,omitzero"`
}
type TypeToTypeNodeParams ¶
type TypeToTypeNodeParams struct {
Snapshot SnapshotID `json:"snapshot"`
Project ProjectID `json:"project"`
Type TypeID `json:"type"`
Location NodeHandle `json:"location,omitempty"`
Flags int32 `json:"flags,omitempty"`
}
TypeToTypeNodeParams are the parameters for the typeToTypeNode method.
type UpdateSnapshotParams ¶
type UpdateSnapshotParams struct {
// OpenProjects lists tsconfig.json files to open/load in the new snapshot.
// Opens are ref-counted and persist across snapshots until closed.
OpenProjects []DocumentIdentifier `json:"openProjects,omitempty"`
// CloseProjects lists tsconfig.json files to release in the new snapshot.
// A project is only unloaded once every API client that opened it closes it.
CloseProjects []DocumentIdentifier `json:"closeProjects,omitempty"`
// FileChanges describes file system changes since the last snapshot.
FileChanges *APIFileChanges `json:"fileChanges,omitempty"`
// OpenFiles lists files to keep open for the API client, mirroring LSP's
// textDocument/didOpen. For each file, ancestor directories are searched for a
// tsconfig that contains it; if found, that configured project is loaded and
// becomes the file's default project. Otherwise the file is loaded into the
// inferred project (e.g. a node_modules d.ts not in any project's import graph).
// Opens persist across snapshots until the file is closed.
OpenFiles []DocumentIdentifier `json:"openFiles,omitempty"`
// CloseFiles lists files to release in the new snapshot. A file is only fully
// closed once every API client that opened it closes it.
CloseFiles []DocumentIdentifier `json:"closeFiles,omitempty"`
}
UpdateSnapshotParams are the parameters for creating a new snapshot. All fields are optional. With no fields set, the server adopts the latest LSP state.
type UpdateSnapshotResponse ¶
type UpdateSnapshotResponse struct {
// Snapshot is the handle for the newly created snapshot.
Snapshot SnapshotID `json:"snapshot"`
// Projects is the list of projects in the snapshot.
Projects []*ProjectResponse `json:"projects"`
// Changes describes source file differences from the previous snapshot.
// Nil for the first snapshot in a session.
Changes *SnapshotChanges `json:"changes,omitempty"`
}
UpdateSnapshotResponse is returned by updateSnapshot.
type WellKnownSymbolsResponse ¶
type WellKnownSymbolsResponse struct {
Unknown SymbolID `json:"unknown"`
Undefined SymbolID `json:"undefined"`
Arguments SymbolID `json:"arguments"`
}
WellKnownSymbolsResponse carries the handle ids of the per-checker singleton symbols (unknown, undefined, arguments) so the client can identify them by id without a round-trip on every check.