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

177
Views
TS2345: el argumento de tipo x no se puede asignar al parámetro de tipo y, x se extiende y

Quiero ejecutar el sigma.js\examples\custom-rendering , cuando ejecuto npm start , obtuve TS2345: Argument of type 'Graph<Attributes, Attributes, Attributes>' is not assignable to parameter of type 'AbstractGraph<Attributes, Attributes, Attributes>'. errores

Encuentro que la declaración de tipo Graph es la siguiente.

 export default class Graph< NodeAttributes extends Attributes = Attributes, EdgeAttributes extends Attributes = Attributes, GraphAttributes extends Attributes = Attributes > extends AbstractGraph<NodeAttributes, EdgeAttributes, GraphAttributes> {} declare abstract class AbstractGraph< NodeAttributes extends Attributes = Attributes, EdgeAttributes extends Attributes = Attributes, GraphAttributes extends Attributes = Attributes > extends EventEmitter<NodeAttributes, EdgeAttributes, GraphAttributes> { ... }

Parece que TypeScript no acepta Graph<Attributes, Attributes, Attributes> como una instancia de AbstractGraph<Attributes, Attributes, Attributes> . Eso es diferente de lo que aprendí en Java / C# .

¿Qué tiene de malo?

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!