mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
remove some anys (#271651)
This commit is contained in:
committed by
GitHub
parent
3a8f6b3483
commit
cee904f80c
@@ -134,16 +134,15 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment)
|
||||
// After the server has started the client sends an initialize request. The server receives
|
||||
// in the passed params the rootPath of the workspace plus the client capabilities
|
||||
connection.onInitialize((params: InitializeParams): InitializeResult => {
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
const initializationOptions = params.initializationOptions as any || {};
|
||||
const initializationOptions = params.initializationOptions || {};
|
||||
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
workspaceFolders = (<any>params).workspaceFolders;
|
||||
if (!Array.isArray(workspaceFolders)) {
|
||||
if (!Array.isArray(params.workspaceFolders)) {
|
||||
workspaceFolders = [];
|
||||
if (params.rootPath) {
|
||||
workspaceFolders.push({ name: '', uri: URI.file(params.rootPath).toString() });
|
||||
}
|
||||
} else {
|
||||
workspaceFolders = params.workspaceFolders;
|
||||
}
|
||||
|
||||
const handledSchemas = initializationOptions?.handledSchemas as string[] ?? ['file'];
|
||||
|
||||
Reference in New Issue
Block a user