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

151
Views
Atar para agregar la extensión Typescript para la fecha
import { DatePipe } from '@angular/common'; declare global { interface Date { transformTo(format: string): string; } } Date.prototype.transformTo = function(format: string): string{ return new DatePipe('en-US').transform(this, format); }; export {};

Resultados en el error:

La propiedad "transformTo" no existe en el tipo 'Fecha'.

He mirado varias publicaciones de SO y todo parece correcto. Cuando tengo un intellisense de Fecha, conozco el método de extensión y lo que espera. El código vs no muestra un error. El error solo ocurre cuando se ejecuta 'ng build'

Versión angular: 9.1.11

Versión del nodo: 14.8.0

Versión de NPM: 6.14.15

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!