From 809a5d44841afaf42c9b6db6bc5f3febaaaeaf6a Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Wed, 21 Jun 2023 16:36:00 -0400 Subject: [PATCH] docs: add comment --- src/task.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/task.ts b/src/task.ts index 00bc9a5..5553ec2 100644 --- a/src/task.ts +++ b/src/task.ts @@ -103,7 +103,7 @@ export abstract class BaseTask< ): this { const hookName = name ?? `preHook_${this._preHooks.length}` this._preHooks.push({ hook, priority, name: hookName }) - this._preHooks.sort((a, b) => b.priority - a.priority) + this._preHooks.sort((a, b) => b.priority - a.priority) // two elements that compare equal will remain in their original order (>= ECMAScript 2019) return this } @@ -119,7 +119,7 @@ export abstract class BaseTask< ): this { const hookName = name ?? `postHook_${this._postHooks.length}` this._postHooks.push({ hook, priority, name: hookName }) - this._postHooks.sort((a, b) => b.priority - a.priority) + this._postHooks.sort((a, b) => b.priority - a.priority) // two elements that compare equal will remain in their original order (>= ECMAScript 2019) return this }