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

This commit is contained in:
Ibrahim authored and Alireza committed 2024-05-16 16:54:33 -04:00
1 parent c11c3b7e61
commit 3539e04019
153 files changed
+842 -654

No files matched your search

@@ -1,6 +1,6 @@
import * as ContextMenuItemsBuilder from './ContextMenuItemsBuilder';
import ContextMenu from '../../../../platform/ui/src/components/ContextMenu/ContextMenu';
import { CommandsManager, ServicesManager, Types } from '@ohif/core';
import { CommandsManager } from '@ohif/core';
import { annotation as CsAnnotation } from '@cornerstonejs/tools';
import { Menu, MenuItem, Point, ContextMenuProps } from './types';
@@ -17,11 +17,11 @@ import { Menu, MenuItem, Point, ContextMenuProps } from './types';
*/
export default class ContextMenuController {
commandsManager: CommandsManager;
services: Types.Services;
services: AppTypes.Services;
menuItems: Menu[] | MenuItem[];
constructor(servicesManager: ServicesManager, commandsManager: CommandsManager) {
this.services = servicesManager.services as Obj;
constructor(servicesManager: AppTypes.ServicesManager, commandsManager: CommandsManager) {
this.services = servicesManager.services;
this.commandsManager = commandsManager;
}