Update @owlboard/ts-types

This commit is contained in:
Fred Boniface 2023-11-30 14:33:57 +00:00
parent ab09455c96
commit b49b2221d7
2 changed files with 7 additions and 7 deletions

8
package-lock.json generated
View File

@ -24,7 +24,7 @@
"zlib": "^1.0.5" "zlib": "^1.0.5"
}, },
"devDependencies": { "devDependencies": {
"@owlboard/ts-types": "^0.1.0", "@owlboard/ts-types": "^0.1.3",
"@types/jest": "^29.5.3", "@types/jest": "^29.5.3",
"eslint": "^8.39.0", "eslint": "^8.39.0",
"jest": "^29.6.2", "jest": "^29.6.2",
@ -1983,9 +1983,9 @@
} }
}, },
"node_modules/@owlboard/ts-types": { "node_modules/@owlboard/ts-types": {
"version": "0.1.0", "version": "0.1.3",
"resolved": "https://git.fjla.uk/api/packages/OwlBoard/npm/%40owlboard%2Fts-types/-/0.1.0/ts-types-0.1.0.tgz", "resolved": "https://git.fjla.uk/api/packages/OwlBoard/npm/%40owlboard%2Fts-types/-/0.1.3/ts-types-0.1.3.tgz",
"integrity": "sha512-5dLkm1wEimiv+pr5wuJbJvPfSek9WuApl/4SBwoFXVO2bmAIktFIHi+bznXKnhW9a7nJwX/w+bVwwJpBOI3I1g==", "integrity": "sha512-BKi/tWvA0SN2rgt2GnFnSXEXzG3DNjeTm0ojVuMElnok9MJ9IniTXRjdAdjm+fe5ShebH6EKacO5f1MDAD3qJw==",
"dev": true, "dev": true,
"license": "GPL-3.0-or-later" "license": "GPL-3.0-or-later"
}, },

View File

@ -6,7 +6,7 @@ import { logger } from "../utils/logger.utils";
// This function is deprecated and should no longer be used. // This function is deprecated and should no longer be used.
// It will be removed in a later version // It will be removed in a later version
async function findByHeadcodeToday(headcode) { async function findByHeadcodeToday(headcode: string) {
const sanitizedHeadcode = clean.removeNonAlphanumeric(headcode).toUpperCase(); const sanitizedHeadcode = clean.removeNonAlphanumeric(headcode).toUpperCase();
logger.debug( logger.debug(
`trainServiceServices.findByHeadcode: Searching for headcode ${sanitizedHeadcode}` `trainServiceServices.findByHeadcode: Searching for headcode ${sanitizedHeadcode}`
@ -42,7 +42,7 @@ async function findByHeadcodeToday(headcode) {
} }
// Finds a train by its headcode value // Finds a train by its headcode value
async function findByHeadcode(date, headcode) { async function findByHeadcode(date: string | Date, headcode: string) {
const sanitizedHeadcode = clean.removeNonAlphanumeric(headcode).toUpperCase(); const sanitizedHeadcode = clean.removeNonAlphanumeric(headcode).toUpperCase();
logger.debug( logger.debug(
`trainServiceServices.findByHeadcode: Searching for headcode ${sanitizedHeadcode}` `trainServiceServices.findByHeadcode: Searching for headcode ${sanitizedHeadcode}`
@ -86,7 +86,7 @@ async function findByHeadcode(date, headcode) {
} }
// Finds a train by its trainUid value // Finds a train by its trainUid value
async function findByTrainUid(uid, date = new Date()) { async function findByTrainUid(uid: string, date: Date | string = new Date()) {
let queryDate; let queryDate;
if (date === "now") { if (date === "now") {
queryDate = new Date(); queryDate = new Date();