Skip to content

TypeScript definition of upsertGraph should have "options" as second parameter #479

@hirikarate

Description

@hirikarate

My project is written in TypeScript and I encounter a TS transpile error when passing 2nd parameter
{ relate: true, unrelate: true } to upsert function.

I don't think this 2nd parameter is deprecated as the official documentation still has an example using it: http://vincit.github.io/objection.js/#graph-upserts. So please complement it to Upsert interface.

interface Upsert<T> {
    (modelsOrObjects?: Array<Partial<T>>): QueryBuilder<T>;
    (modelOrObject?: Partial<T>): QueryBuilderSingle<T>;
    (): this;
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions