October 24, 2024
Chicago 12, Melborne City, USA
javascript

Able to use interface as generic before interface is declared


Why does this work? I would expect SomeInterface to not be defined in time to be passed as an argument:

interface SomeInterface
  extends Model<
    InferAttributes<SomeInterface>,
    InferCreationAttributes<SomeInterface>
  >
{ ...

(example from https://sequelize.org/api/v7/types/_sequelize_core.index.inferattributes)



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video