-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #1921 [Live] Fix typing for loading hooks + HookManager (YummYume)
This PR was merged into the 2.x branch. Discussion ---------- [Live] Fix typing for loading hooks + HookManager | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Issues | | License | MIT See symfony/ux#1916 (comment) for context Fixes the typo on the loading hooks and add the hook typing to the `HookManager` (was forgotten in my first pr) Commits ------- 94285477 Fix typing for loading hooks + HookManager
- Loading branch information
Showing
4 changed files
with
23 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import type { ComponentHookName, ComponentHookCallback } from './Component'; | ||
export default class { | ||
private hooks; | ||
register(hookName: string, callback: (...args: any[]) => void): void; | ||
unregister(hookName: string, callback: (...args: any[]) => void): void; | ||
triggerHook(hookName: string, ...args: any[]): void; | ||
register<T extends string | ComponentHookName = ComponentHookName>(hookName: T, callback: ComponentHookCallback<T>): void; | ||
unregister<T extends string | ComponentHookName = ComponentHookName>(hookName: T, callback: ComponentHookCallback<T>): void; | ||
triggerHook<T extends string | ComponentHookName = ComponentHookName>(hookName: T, ...args: Parameters<ComponentHookCallback<T>>): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters