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

516
Views
WebStorm / IntelliJ Object Error literal donde no debería estar, ¿verdad?

Mientras escribo mi código en WebStorm O IntelliJ (ambas versiones más recientes), el siguiente código me da un error que, en mi opinión, no debería estar allí.

¿Me estoy perdiendo algo en mi código aquí o podría ser un problema de IDE?

Error

 Argument of type '{ body: { content: string; fileType: FileType; groups: string[]; name: string; }; }' is not assignable to parameter of type 'CreateTemplate'. Object literal may only specify known properties, and 'body' does not exist in type 'CreateTemplate'.

Diálogo.componente.ts

 accept(): void { this.api.createTemplate({ body: { content: '', fileType: this.filetypeFull, groups: this.selectedGroups, name: this.filename } }) this.dialogRef.close();

}

api.servicio.ts

 createTemplate(params: { body: CreateTemplate }): Observable<Template> { return this.createTemplate$Response(params).pipe( map((r: StrictHttpResponse<Template>) => r.body as Template) ); }

crear-plantilla.modelo.ts

 export interface CreateTemplate { content?: string; fileType: FileType; groups: Array<string>; name: string; }
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!