Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

146
Vistas
Override variable type from external library

I am using a third party library for my react application. There are some incorrect/outdated types.

Let's say the library has the following type declarations:

declare const Hello: (name: string) => void

export interface SomeInterface {
  property1: string
  property2: number
}

Let's assume both of these types are incorrect and I need to override them:

import 'external-lib'

declare module 'external-lib'{
  export interface SomeInterface {
    property1: boolean
    property2: boolean
  }

  export declare const Hello: (name: string, age: number) => void
}

So I redeclared the interface to have boolean properties and Hello function to accept the age parameter. (This is correct implementation of the library).

My problem is, that while interface Someinterface is overridden by me properly, the function Hello still uses the internal library type.

Is there a way to override function type declaration from external library?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda