replace `undefined` with `null`

pull/7324/head
Ivan Hofer 5 years ago
parent 22aa51d149
commit 5491871968

@ -34,9 +34,9 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
type ExtractObjectValues<Object extends Record<any, any>> = Object[keyof Object]
type ConstructDispatchFunction<EventMap extends Record<string, any>, EventKey extends keyof EventMap> =
EventMap[EventKey] extends never
EventMap[EventKey] extends never | null
? (type: EventKey) => void
: undefined extends EventMap[EventKey]
: null extends EventMap[EventKey]
? (type: EventKey, detail?: EventMap[EventKey]) => void
: (type: EventKey, detail: EventMap[EventKey]) => void

Loading…
Cancel
Save