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

138
Vistas
El argumento de tipo 'IResizeHandleSettingsDetail' no se puede asignar al parámetro de tipo 'IResizeHandleSettings'

¿Por qué estas líneas

 handleSettings: IResizeHandleSettings = { right: { position: 'right', axis: 'x', dimension: 'width', eventProperty: 'clientX', translate: false, deltaMultiplier: 1, }, left: { position: 'left', axis: 'x', dimension: 'width', eventProperty: 'clientX', translate: true, deltaMultiplier: -1, }, bottom: { position: 'bottom', axis: 'y', dimension: 'height', eventProperty: 'clientY', translate: false, deltaMultiplier: 1, }, top: { position: 'top', axis: 'y', dimension: 'height', eventProperty: 'clientY', translate: true, deltaMultiplier: -1, }, }; selectedHandleSettings: { x: string | undefined | null; y: string | undefined | null; settings: IResizeHandleSettings[]; }; method(positionKey: string) { this.selectedHandleSettings.settings.push(this.handleSettings[positionKey]); }

lanzar el error

 S2345: Argument of type 'IResizeHandleSettingsDetail' is not assignable to parameter of type 'IResizeHandleSettings'.   Type 'IResizeHandleSettingsDetail' is missing the following properties from type 'IResizeHandleSettings': left, right, top, bottom

aunque mi tipo se define con la firma de índice de la siguiente manera

 export interface IResizeHandleSettings { [key: string]: IResizeHandleSettingsDetail; left: IResizeHandleSettingsDetail; right: IResizeHandleSettingsDetail; top: IResizeHandleSettingsDetail; bottom: IResizeHandleSettingsDetail; } export interface IResizeHandleSettingsDetail { position: string; axis: string; dimension: string; eventProperty: string; translate: boolean; deltaMultiplier: number; }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

this.handleSettings[positionKey] hace referencia a un IResizeHandleSettingsDetail , por lo que debe configurar selectedHandleSettings en consecuencia:

 selectedHandleSettings: { x: string | undefined | null; y: string | undefined | null; settings: IResizeHandleSettingsDetail[]; // <-- ...Detail! };
about 4 years ago · Juan Pablo Isaza Denunciar
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