콘텐츠로 이동
한국어

KindOf

이 콘텐츠는 아직 번역되지 않았습니다.

KindOf<TEvent> = TEvent extends object ? TKind : string

Defined in: src/EventKey.ts:34

The kind of an event type — or plain string when the type carries none, which is what a class channel and an unparameterised call both land on.

Its job is to make the kind checkable against the event type rather than merely typed as a string, so that EventKey.of<UserLoggedInEvent>('user-loged-in') is a compile error rather than a subscription that quietly never matches.

TEvent