# Modify type · @imqueue/pg-sequelize

Source: https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.modify/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-sequelize 4.2.0 — generated reference, not hand-written

Replaces every member of `T` that `R` also declares with `R`'s version of it.

**Signature:**

```typescript
export type Modify<T, R> = Pick<T, Exclude<keyof T, keyof R>> & R;
```

## Remarks

The mechanism behind each widened option type in this module. Sequelize types `returning` as a boolean; this package needs it to accept a column list as well, and intersecting the two would leave a member that has to be both. Removing the keys `R` redeclares before intersecting is what lets the override win instead.

`T` is the type to start from and `R` the members to override it with, so the widened save options are Sequelize's own with only `returning` replaced.

