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

138
Visualizações
How can I override or add new type to a third-party package's type interface?

I'm using a third-party package where it is perfectly typed and everything is working fine. But due to my project's requirements I have to extend the types illustrated in the package.

Let's say there's an interface called Data in the package which looks like this:

export interface Data {
    id: number;
    name: string;
    address: string;
}

Now I need to add a new type, called description in the above interface like this:

export interface Data {
    id: number;
    name: string;
    address: string;
    description: string;
}

For obvious reasons, it's not right to update the interface directly which is in node_modules folder.

Is there a way to add a new type to an interface which already exists in a third-party package?

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