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

117
Views
Reaccionar interfaz mecanografiada

¡Tengo un problema al hacer una interfaz en Typescript!

 export interface Content { uuid?: string; brand_id?: string; brand_name?: string; is_active?: boolean; } export interface Pageable { sort?: Sort; pageSize?: number; pageNumber?: number; offset?: number; unpaged?: boolean; paged?: boolean; } export interface Sort { sorted?: boolean; unsorted?: boolean; empty?: boolean; } export interface BrandData { content?: Content; pageable?: Pageable; numberOfElements?: number; number?: number; sort?: Sort; size?: number; first?: boolean; last?: boolean; empty?: boolean; } export interface BrandResponse { readonly data?: BrandData[]; }

y luego quiero obtener datos en un componente de reacción como este

 const { brands } = useSelector((state: AppState) => state.catalogs.brands); const [brandData, setBrandData] = React.useState(brands.data); const [currentPage, setCurrentPage] = React.useState(brandData.pageable.pageNumber);

entonces el error sale como esta Propiedad 'pageable' no existe en el tipo 'BrandData[]'.

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!