From 96239ec1934dda2549d084726f5286f09d3b2dc4 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Wed, 13 Mar 2024 08:01:19 -0500 Subject: [PATCH] Import types to prevent missing dependency --- package.json | 5 ++--- src/Handler/asyncHandler.ts | 2 +- src/HttpUtil/getHttpHeader.ts | 2 +- yarn.lock | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index dfc53ae..e793ee6 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@xylabs/tsconfig": "^3.5.2", "@xylabs/tsconfig-jest": "^3.5.2", "body-parser": "^1.20.2", + "connect": "^3.7.0", "eslint": "^8.57.0", "express": "^4.18.3", "express-mung": "^0.5.1", @@ -46,6 +47,7 @@ "@aws-sdk/client-secrets-manager": "^3.256.0", "@xylabs/assert": "^2.6.16", "body-parser": "^1.20.1", + "connect": "^3.7.0", "express": "^4", "express-mung": "^0.5.1", "http-status-codes": "^2.2.0", @@ -103,9 +105,6 @@ }, "sideEffects": false, "packageManager": "yarn@3.6.3", - "dependencies": { - "connect": "^3.7.0" - }, "volta": { "node": "18.19.0", "yarn": "1.22.19" diff --git a/src/Handler/asyncHandler.ts b/src/Handler/asyncHandler.ts index 7a429c6..9304ff1 100644 --- a/src/Handler/asyncHandler.ts +++ b/src/Handler/asyncHandler.ts @@ -1,5 +1,5 @@ import { NextFunction, Request, RequestHandler, Response } from 'express' -import { ParamsDictionary, Query } from 'express-serve-static-core' +import type { ParamsDictionary, Query } from 'express-serve-static-core' export function asyncHandler

( fn: RequestHandler, diff --git a/src/HttpUtil/getHttpHeader.ts b/src/HttpUtil/getHttpHeader.ts index 6120765..aa49b35 100644 --- a/src/HttpUtil/getHttpHeader.ts +++ b/src/HttpUtil/getHttpHeader.ts @@ -1,4 +1,4 @@ -import { Request } from 'express-serve-static-core' +import type { Request } from 'express-serve-static-core' /** * Since there can be multiple of certain HTTP headers or diff --git a/yarn.lock b/yarn.lock index 04d3724..610d40b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3292,6 +3292,7 @@ __metadata: "@aws-sdk/client-secrets-manager": ^3.256.0 "@xylabs/assert": ^2.6.16 body-parser: ^1.20.1 + connect: ^3.7.0 express: ^4 express-mung: ^0.5.1 http-status-codes: ^2.2.0