Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
lehni committed Feb 9, 2024
1 parent 68cb007 commit 8644107
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/plugin-with-options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = (options) => {
}

$beforeUpdate(opt, context) {
// If you exetend existing methods like this one, always remember to call the
// If you extend existing methods like this one, always remember to call the
// super implementation. Check the documentation to see if the function can be
// async and prepare for that also.
const maybePromise = super.$beforeUpdate(opt, context);
Expand Down
7 changes: 2 additions & 5 deletions tests/ts/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,8 @@ function takesModel(m: objection.Model) {}
function takesModelClass(m: objection.ModelClass<any>) {}

// Borrowed from https://github.com/TypeStrong/ts-expect/blob/39f04b5/src/index.ts
type TypeEqual<T, U> = Exclude<T, U> extends never
? Exclude<U, T> extends never
? true
: false
: false;
type TypeEqual<T, U> =
Exclude<T, U> extends never ? (Exclude<U, T> extends never ? true : false) : false;
const expectsTrue = <T extends true>() => 1;

const takesPerson = (person: Person) => {
Expand Down
15 changes: 8 additions & 7 deletions typings/objection/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,14 @@ declare namespace Objection {
}
: never;

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>;
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>;

/**
* Extracts the property names (excluding relations) of a model class.
Expand Down

0 comments on commit 8644107

Please sign in to comment.