Skip to content

postgrelize / ThroughOptions

Type Alias: ThroughOptions ​

ThroughOptions = Readonly<{ model: string | ModelStatic<AnyModel>; scope?: Readonly<Record<string, unknown>>; }>

Defined in: src/associations/types.ts:85

Junction table of a belongsToMany association given as an object.

Example ​

ts
const through: ThroughOptions = { model: 'ProjectTask', scope: { kind: 'member' } };
Project.belongsToMany(Task, { through });

Released under the MIT License.