Skip to content

Commit 5491871

Browse files
committed
replace undefined with null
1 parent 22aa51d commit 5491871

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/internal/lifecycle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
3434
type ExtractObjectValues<Object extends Record<any, any>> = Object[keyof Object]
3535

3636
type ConstructDispatchFunction<EventMap extends Record<string, any>, EventKey extends keyof EventMap> =
37-
EventMap[EventKey] extends never
37+
EventMap[EventKey] extends never | null
3838
? (type: EventKey) => void
39-
: undefined extends EventMap[EventKey]
39+
: null extends EventMap[EventKey]
4040
? (type: EventKey, detail?: EventMap[EventKey]) => void
4141
: (type: EventKey, detail: EventMap[EventKey]) => void
4242

0 commit comments

Comments
 (0)