Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
lehni committed Nov 26, 2023
1 parent d370638 commit b8cb546
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions lib/queryBuilder/ReferenceBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class ReferenceBuilder {
const table = this.tableName
? this.tableName
: this.modelClass
? builder.tableRefFor(this.modelClass)
: null;
? builder.tableRefFor(this.modelClass)
: null;

if (table) {
return `${table}.${this.column}`;
Expand Down
52 changes: 26 additions & 26 deletions typings/objection/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ declare namespace Objection {
[K in DataPropertyNames<T>]?: Defined<T[K]> extends Model
? T[K]
: Defined<T[K]> extends Array<infer I>
? I extends Model
? I[]
: Expression<T[K]>
: Expression<T[K]>;
? I extends Model
? I[]
: Expression<T[K]>
: Expression<T[K]>;
};

/**
Expand All @@ -232,10 +232,10 @@ declare namespace Objection {
type PartialModelGraphField<F> = Defined<F> extends Model
? PartialModelGraph<Defined<F>>
: Defined<F> extends Array<infer I>
? I extends Model
? PartialModelGraph<I>[]
: Expression<F>
: Expression<F>;
? I extends Model
? PartialModelGraph<I>[]
: Expression<F>
: Expression<F>;

/**
* Extracts the property names (excluding relations) of a model class.
Expand All @@ -245,12 +245,12 @@ declare namespace Objection {
[K in keyof T]?: Defined<T[K]> extends Model
? never
: Defined<T[K]> extends Array<infer I>
? I extends Model
? never
: K
: T[K] extends Function
? never
: K;
? I extends Model
? never
: K
: T[K] extends Function
? never
: K;
}[keyof T],
undefined | 'QueryBuilderType'
>;
Expand All @@ -263,10 +263,10 @@ declare namespace Objection {
[K in keyof T]?: Defined<T[K]> extends Model
? K
: Defined<T[K]> extends Array<infer I>
? I extends Model
? K
: never
: never;
? I extends Model
? K
: never
: never;
}[keyof T]
>;

Expand All @@ -277,10 +277,10 @@ declare namespace Objection {
type RelatedQueryBuilder<T> = T extends Model
? SingleQueryBuilder<QueryBuilderType<T>>
: T extends Array<infer I>
? I extends Model
? QueryBuilderType<I>
: never
: never;
? I extends Model
? QueryBuilderType<I>
: never
: never;

/**
* Just like RelatedQueryBuilder but always returns an array
Expand All @@ -290,10 +290,10 @@ declare namespace Objection {
type ArrayRelatedQueryBuilder<T> = T extends Model
? QueryBuilderType<T>
: T extends Array<infer I>
? I extends Model
? QueryBuilderType<I>
: never
: never;
? I extends Model
? QueryBuilderType<I>
: never
: never;

/**
* Gets the query builder type for a model type.
Expand Down

0 comments on commit b8cb546

Please sign in to comment.