import { Connection } from 'vscode-languageserver/lib/common/server' ; /**
 * Due to LSP limitation this object must be JSON serializable
 */ export interface TelemetryEvent { name : string ; type ? : string ; properties ? : unknown ; measures ? : unknown ; traits ? : unknown ; context ? : unknown ; } export class Telemetry { constructor ( private readonly connection ) { } send ( event ) { this . connection . telemetry . logEvent ( event ) ; } sendError ( name , properties ) { this . send ( { name , type : 'track' , properties : properties } ) ; } sendTrack ( name , properties ) { this . send ( { name , type : 'track' , properties : properties } ) ; } }