1+ /* eslint-disable @typescript-eslint/no-explicit-any */
12// Copyright (c) Microsoft Corporation. All rights reserved.
23// Licensed under the MIT License.
34
@@ -16,14 +17,15 @@ import { getDebugpyLauncherArgs, getDebugpyPackagePath } from './debugger/extens
1617import { IInterpreterService } from './interpreter/contracts' ;
1718import { IServiceContainer , IServiceManager } from './ioc/types' ;
1819import { JupyterExtensionIntegration } from './jupyter/jupyterIntegration' ;
20+ import { IDataViewerDataProvider , IJupyterUriProvider } from './jupyter/types' ;
1921import { traceError } from './logging' ;
2022import { IDiscoveryAPI } from './pythonEnvironments/base/locator' ;
2123import { buildEnvironmentApi } from './environmentApi' ;
2224import { ApiForPylance } from './pylanceApi' ;
2325import { getTelemetryReporter } from './telemetry' ;
2426
2527export function buildApi (
26- ready : Promise < any > ,
28+ ready : Promise < void > ,
2729 serviceManager : IServiceManager ,
2830 serviceContainer : IServiceContainer ,
2931 discoveryApi : IDiscoveryAPI ,
@@ -89,7 +91,7 @@ export function buildApi(
8991 async getRemoteLauncherCommand (
9092 host : string ,
9193 port : number ,
92- waitUntilDebuggerAttaches : boolean = true ,
94+ waitUntilDebuggerAttaches = true ,
9395 ) : Promise < string [ ] > {
9496 return getDebugpyLauncherArgs ( {
9597 host,
@@ -104,7 +106,7 @@ export function buildApi(
104106 settings : {
105107 onDidChangeExecutionDetails : interpreterService . onDidChangeInterpreterConfiguration ,
106108 getExecutionDetails ( resource ?: Resource ) {
107- const pythonPath = configurationService . getSettings ( resource ) . pythonPath ;
109+ const { pythonPath } = configurationService . getSettings ( resource ) ;
108110 // If pythonPath equals an empty string, no interpreter is set.
109111 return { execCommand : pythonPath === '' ? undefined : [ pythonPath ] } ;
110112 } ,
@@ -114,10 +116,10 @@ export function buildApi(
114116 datascience : {
115117 registerRemoteServerProvider : jupyterIntegration
116118 ? jupyterIntegration . registerRemoteServerProvider . bind ( jupyterIntegration )
117- : ( noop as any ) ,
119+ : ( ( noop as unknown ) as ( serverProvider : IJupyterUriProvider ) => void ) ,
118120 showDataViewer : jupyterIntegration
119121 ? jupyterIntegration . showDataViewer . bind ( jupyterIntegration )
120- : ( noop as any ) ,
122+ : ( ( noop as unknown ) as ( dataProvider : IDataViewerDataProvider , title : string ) => Promise < void > ) ,
121123 } ,
122124 pylance : {
123125 createClient : ( ...args : any [ ] ) : BaseLanguageClient => {
0 commit comments