(pythonApi: PythonApi, serviceContainer: IServiceContainer)
| 6 | |
| 7 | let registered = false; |
| 8 | export function registerPythonApi(pythonApi: PythonApi, serviceContainer: IServiceContainer) { |
| 9 | if (registered) { |
| 10 | return; |
| 11 | } |
| 12 | registered = true; |
| 13 | const apiProvider = serviceContainer.get<IPythonApiProvider>(IPythonApiProvider); |
| 14 | apiProvider.setApi(pythonApi); |
| 15 | } |