mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
adopt web extensions to webpack 5
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { createConnection, Connection } from 'vscode-languageserver/node';
|
||||
import { createConnection, Connection, Disposable } from 'vscode-languageserver/node';
|
||||
import { formatError } from '../utils/runner';
|
||||
import { startServer } from '../cssServer';
|
||||
import { RuntimeEnvironment, startServer } from '../cssServer';
|
||||
import { getNodeFSRequestService } from './nodeFs';
|
||||
|
||||
// Create a connection for the server.
|
||||
@@ -18,4 +18,18 @@ process.on('unhandledRejection', (e: any) => {
|
||||
connection.console.error(formatError(`Unhandled exception`, e));
|
||||
});
|
||||
|
||||
startServer(connection, { file: getNodeFSRequestService() });
|
||||
const runtime: RuntimeEnvironment = {
|
||||
timer: {
|
||||
setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable {
|
||||
const handle = setImmediate(callback, ...args);
|
||||
return { dispose: () => clearImmediate(handle) };
|
||||
},
|
||||
setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable {
|
||||
const handle = setTimeout(callback, ms, ...args);
|
||||
return { dispose: () => clearTimeout(handle) };
|
||||
}
|
||||
},
|
||||
file: getNodeFSRequestService()
|
||||
};
|
||||
|
||||
startServer(connection, runtime);
|
||||
|
||||
Reference in New Issue
Block a user