import { ExtensionContext , Uri } from 'vscode' ; import { LanguageClientOptions } from 'vscode-languageclient' ; import { startClient , LanguageClientConstructor } from '../cssClient' ; import { LanguageClient } from 'vscode-languageclient/browser' ; declare const Worker ; declare const TextDecoder ; export function activate ( context ) { const serverMain = Uri . joinPath ( context . extensionUri , 'server/dist/browser/cssServerMain.js' ) ; try { const worker = new Worker ( serverMain . toString ( ) ) ; const newLanguageClient = ( id , name , clientOptions ) => { return new LanguageClient ( id , name , clientOptions , worker ) ; } ; startClient ( context , newLanguageClient , { TextDecoder } ) ; } catch ( e ) { console . log ( e ) ; } }