vendor tsgo

This commit is contained in:
2026-07-09 16:50:43 -04:00
parent c06ea2e5a4
commit 98978e4930
5804 changed files with 1556156 additions and 101 deletions

View File

@@ -0,0 +1,22 @@
package api
import (
"github.com/microsoft/typescript-go/internal/jsonrpc"
)
// Message is an alias for jsonrpc.Message for convenience.
type Message = jsonrpc.Message
// Protocol defines the interface for reading and writing API messages.
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
}