Repository navigation
Add HookEngine.addPipe for typed pipe middleware registration - #148
Merged
Merged
Conversation
add() types every callback for the run() shape, so pipe middleware could not register without an as-any cast. addPipe accepts PipeCallback against the lifecycle signature over the same registry pipe() already invokes. Migrates the fetch retry/dedupe plugins off their casts, adds the suite's first direct pipe()/pipeSync() coverage, documents the API (changeset: hooks minor, fetch patch), and fixes three doc examples that passed args to the zero-arg coreFn. Closes #147
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
add()types every callback for therun()shape, so pipe middleware could not be registered withoutas any— the exportedPipeCallbacktype was accepted nowhere.addPipe()accepts it, typed against the lifecycle signature, over the same registrypipe()/pipeSync()already invoke.executemiddleware through it, dropping the casts that motivated the issue.pipe()/pipeSync()coverage, and fixes three doc examples that passed arguments to the zero-argcoreFn.What this solves
Any
FetchPlugin(or other consumer) wrapping a pipe hook can now compile without suppressions. Type-only change — no runtime behavior differs.Closes #147