Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

135
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda