Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

134
Views
Typescript app and package sharing a dependency: Express

Stumped on how to handle this situation: I have an Express app: @app. That app is using a package I made: @helper. @helper receives a variable app:Express from @app and does some stuff with it.

Should I have "express" installed on both @app and @helper? They would need the same version, and I don't know how I could enforce that. I could skip installing express on @helper and just keep @types/express, but I'd still have the same risk of @helper breaking if @app upgrades express.

Should I be trying to decouple @helper from express? @helper is doing a lot with the variable app:Express, and trying to swap-out everything express related with custom functions would be messy.

Any advice or guidance would be greatly appreciated!

For example:

@app index.ts:

import express from "express"
import { doStuff } from "@helper"

const app = express()
doStuff(app)

@helper index.ts:

export function doStuff( app: Express ) {
  app.get("/route", (req, res) => { })
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!