docs: add comment

old-agentic-v1^2
Philipp Burckhardt 2023-06-21 16:36:00 -04:00
rodzic 73dcb7ee63
commit 809a5d4484
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: A2C3BCA4F31D1DDD
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -103,7 +103,7 @@ export abstract class BaseTask<
): this { ): this {
const hookName = name ?? `preHook_${this._preHooks.length}` const hookName = name ?? `preHook_${this._preHooks.length}`
this._preHooks.push({ hook, priority, name: hookName }) 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 return this
} }
@ -119,7 +119,7 @@ export abstract class BaseTask<
): this { ): this {
const hookName = name ?? `postHook_${this._postHooks.length}` const hookName = name ?? `postHook_${this._postHooks.length}`
this._postHooks.push({ hook, priority, name: hookName }) 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 return this
} }