Skip to content

TypeScript 4.7 Upgrade results in "Type instantiation is excessively deep and possibly infinite." #2277

@laurisvan

Description

@laurisvan

This is a followup to issue #1668, which seems to resurface with the latest TypeScript (4.7 RC1) upgrade.

Queries of type

await this.$query()
  .patch({
    ...update
  })
  .returning('*')

Result in TS error TS2589: Type instantiation is excessively deep and possibly infinite..

It appears it is related to this.$query() type of queries, and particularly to .returning('*'). The model class used in the app is of type export class WorkPlan extends RescommsModel (where RescommsModel is of type export class RescommsModel extends Model), but it appears that inheriting directly from Objection Model does not make any difference.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions