Skip to content

Commit df6582c

Browse files
committed
Disable distribution for VoidableCallback conditional type. Resolves #42
1 parent 8ac58b1 commit df6582c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/use-event-callback.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Observable, BehaviorSubject, Subject, noop } from 'rxjs'
33

44
import { RestrictArray, VoidAsNull, Not } from './type'
55

6-
type VoidableCallback<EventValue> = EventValue extends void ? () => void : (val: EventValue) => void
6+
type VoidableCallback<EventValue> = [EventValue] extends [void] ? () => void : (val: EventValue) => void
77

88
export type EventCallbackState<EventValue, State, Inputs = void> = [
99
VoidableCallback<EventValue>,

0 commit comments

Comments
 (0)