From 077b08b5cfcfa792157e0beb04addfda88f333d1 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Mon, 6 Mar 2023 11:59:41 -0500 Subject: [PATCH] Incremental conversion of utils to typescript --- client/package.json | 2 + client/src/utils/{utils.js => utils.ts} | 120 ++++++++++++------------ client/yarn.lock | 17 ++++ 3 files changed, 81 insertions(+), 58 deletions(-) rename client/src/utils/{utils.js => utils.ts} (77%) diff --git a/client/package.json b/client/package.json index 1d0b902aa40..6e013cd412a 100644 --- a/client/package.json +++ b/client/package.json @@ -142,7 +142,9 @@ "@babel/preset-typescript": "^7.18.6", "@cerner/duplicate-package-checker-webpack-plugin": "^2.3.0", "@testing-library/jest-dom": "^5.16.4", + "@types/jquery": "^3.5.16", "@types/markdown-it": "^12.2.3", + "@types/underscore": "^1.11.4", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.51.0", "@vue/test-utils": "^1.3.4", diff --git a/client/src/utils/utils.js b/client/src/utils/utils.ts similarity index 77% rename from client/src/utils/utils.js rename to client/src/utils/utils.ts index 3e3a9981f48..e19d013424b 100644 --- a/client/src/utils/utils.js +++ b/client/src/utils/utils.ts @@ -5,21 +5,21 @@ import _ from "underscore"; import $ from "jquery"; -import { getAppRoot } from "onload/loadConfig"; -import { getGalaxyInstance } from "app"; -import _l from "utils/localization"; +import { getAppRoot } from "@/onload/loadConfig"; +import { getGalaxyInstance } from "@/app"; +import _l from "@/utils/localization"; /** Builds a basic iframe */ -export function iframe(src) { +export function iframe(src: string) { return `