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

95
Views
Creating TypeScript Data Model

I am studying backend development using NodeJS and TypeScript. To start, I am checking this sample inventory. While reading the models, I got confused because there is an interface that is both extended (but inside the Model wrapper) and implemented.

The interface:

interface SaleAttributes {
    id: string;
    quantity: number;

    // foreign key
    productId?: string;
}

Base Class:

export class Sale extends Model<SaleAttributes, SaleCreationAttributes>
    implements SaleAttributes {
.
.
.
}

This is the complete code.

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!