HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: /var/www/api.javaapp.co.uk/node_modules/sequelize/types/model-manager.d.ts
import { Model, ModelType } from './model';
import { Sequelize } from './sequelize';

export class ModelManager {
  public sequelize: Sequelize;
  public models: typeof Model[];
  public all: typeof Model[];

  constructor(sequelize: Sequelize);
  public addModel<T extends ModelType>(model: T): T;
  public removeModel(model: ModelType): void;
  public getModel(against: unknown, options?: { attribute?: string }): typeof Model;
  public findModel(callback: (model: typeof Model) => boolean): typeof Model | undefined

  /**
   * Returns an array that lists every model, sorted in order
   * of foreign key references: The first model is a model that is depended upon,
   * the last model is a model that is not depended upon.
   *
   * If there is a cyclic dependency, this returns null.
   */
  public getModelsTopoSortedByForeignKey(): ModelType[] | null;
}

export default ModelManager;