Conversation
✅ Deploy Preview for rolldown-rs canceled.
|
| : never { | ||
| if (typeof hook === "function") { | ||
| // @ts-ignore | ||
| return [hook, {}]; |
There was a problem hiding this comment.
Sadly, it still needs ts directive, forgive me poor type gymnastics
Your org has enabled the Graphite merge queue for merging into mainAdd the label “!merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “!merge-as-hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
| hook: T, | ||
| ): T extends ObjectHook<infer A, infer B> | ||
| ? T extends Function | ||
| ? [A, {}] |
There was a problem hiding this comment.
I refactor the function to make support ObjectHook<string, {}> for AddonHooks, and remove using infer make typing clear, the @ts-expect-error is not used.
There was a problem hiding this comment.
I see the pr, but it lost the ability to infer the type
|
I am gonna merge this, but I am open to accept if any one have a better idea |
0fa8543 to
1153c73
Compare
Merge activity
|
<!-- Thank you for contributing! --> ### Description Closed #1811 <!-- Please insert your description here and provide especially info about the "what" this PR is solving -->
1153c73 to
3153a61
Compare



Description
Closed #1811