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

+1 -1
View File
@@ -4,7 +4,7 @@ const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
const ENTRY = {
app: `${SRC_DIR}/index.js`,
app: `${SRC_DIR}/index.ts`,
};
module.exports = (env, argv) => {
+1 -1
View File
@@ -11,7 +11,7 @@ const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
const ENTRY = {
app: `${SRC_DIR}/index.js`,
app: `${SRC_DIR}/index.ts`,
};
module.exports = (env, argv) => {
+1 -1
View File
@@ -6,7 +6,7 @@
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/ohif-mode-tmtv.umd.js",
"module": "src/index.js",
"module": "src/index.ts",
"engines": {
"node": ">=14",
"npm": ">=6",
@@ -35,7 +35,7 @@ const extensionDependencies = {
'@ohif/extension-tmtv': '^3.0.0',
};
let unsubscriptions = [];
const unsubscriptions = [];
function modeFactory({ modeConfiguration }) {
return {
// TODO: We're using this as a route segment
@@ -46,7 +46,7 @@ function modeFactory({ modeConfiguration }) {
/**
* Lifecycle hooks
*/
onModeEnter: ({ servicesManager, extensionManager, commandsManager }) => {
onModeEnter: ({ servicesManager, extensionManager, commandsManager }: withAppTypes) => {
const {
toolbarService,
toolGroupService,
@@ -146,7 +146,7 @@ function modeFactory({ modeConfiguration }) {
}
);
},
onModeExit: ({ servicesManager }) => {
onModeExit: ({ servicesManager }: withAppTypes) => {
const {
toolGroupService,
syncGroupService,