We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8ac58b1 + df6582c commit 9c6d60cCopy full SHA for 9c6d60c
src/use-event-callback.ts
@@ -3,7 +3,7 @@ import { Observable, BehaviorSubject, Subject, noop } from 'rxjs'
3
4
import { RestrictArray, VoidAsNull, Not } from './type'
5
6
-type VoidableCallback<EventValue> = EventValue extends void ? () => void : (val: EventValue) => void
+type VoidableCallback<EventValue> = [EventValue] extends [void] ? () => void : (val: EventValue) => void
7
8
export type EventCallbackState<EventValue, State, Inputs = void> = [
9
VoidableCallback<EventValue>,
0 commit comments