import { CommonLanguageClient , LanguageClientOptions , MessageTransports } from '../common/api' ; import { BrowserMessageReader , BrowserMessageWriter } from 'vscode-languageserver-protocol/browser' ; export * from 'vscode-languageserver-protocol/browser' ; export * from '../common/api' ; export class LanguageClient extends CommonLanguageClient { constructor ( id , name , clientOptions , private worker ) { super ( id , name , clientOptions ) ; } protected createMessageTransports ( _encoding ) { const reader = new BrowserMessageReader ( this . worker ) ; const writer = new BrowserMessageWriter ( this . worker ) ; return Promise . resolve ( { reader , writer } ) ; } protected getLocale ( ) { return 'en' ; } }