feat(typings): Enhance typing support with withAppTypes and custom services throughout OHIF (#4090)

This commit is contained in:
Ibrahim authored and GitHub committed 2024-05-08 12:12:49 -04:00
1 parent b2cd0172d6
commit 374065bc3b
153 files changed
+842 -657

No files matched your search

@@ -9,7 +9,7 @@ import { createDicomWebApi } from '../DicomWebDataSource/index';
* dicomWeb configuration array
*
*/
function createDicomWebProxyApi(dicomWebProxyConfig, servicesManager) {
function createDicomWebProxyApi(dicomWebProxyConfig, servicesManager: AppTypes.ServicesManager) {
const { name } = dicomWebProxyConfig;
let dicomWebDelegate = undefined;
@@ -21,7 +21,7 @@ function createDicomWebProxyApi(dicomWebProxyConfig, servicesManager) {
throw new Error(`No url for '${name}'`);
} else {
const response = await fetch(url);
let data = await response.json();
const data = await response.json();
if (!data.servers?.dicomWeb?.[0]) {
throw new Error('Invalid configuration returned by url');
}