diff --git a/examples/plugin-with-options/index.js b/examples/plugin-with-options/index.js index 32a7c02ab..3ac964389 100644 --- a/examples/plugin-with-options/index.js +++ b/examples/plugin-with-options/index.js @@ -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); diff --git a/tests/ts/examples.ts b/tests/ts/examples.ts index 853045b93..eaaeeef1c 100644 --- a/tests/ts/examples.ts +++ b/tests/ts/examples.ts @@ -172,11 +172,8 @@ function takesModel(m: objection.Model) {} function takesModelClass(m: objection.ModelClass) {} // Borrowed from https://github.com/TypeStrong/ts-expect/blob/39f04b5/src/index.ts -type TypeEqual = Exclude extends never - ? Exclude extends never - ? true - : false - : false; +type TypeEqual = + Exclude extends never ? (Exclude extends never ? true : false) : false; const expectsTrue = () => 1; const takesPerson = (person: Person) => { diff --git a/typings/objection/index.d.ts b/typings/objection/index.d.ts index 848bdca10..8fdd8eced 100644 --- a/typings/objection/index.d.ts +++ b/typings/objection/index.d.ts @@ -229,13 +229,14 @@ declare namespace Objection { } : never; - type PartialModelGraphField = Defined extends Model - ? PartialModelGraph> - : Defined extends Array - ? I extends Model - ? PartialModelGraph[] - : Expression - : Expression; + type PartialModelGraphField = + Defined extends Model + ? PartialModelGraph> + : Defined extends Array + ? I extends Model + ? PartialModelGraph[] + : Expression + : Expression; /** * Extracts the property names (excluding relations) of a model class.