Define a stand-alone typed event that can be emitted and listened to inside of HTML templates.
Make sure to use currying and call this function twice! (This is required by TypeScript's type parameter inference system.)
import {defineTypedEvent} from 'element-vir';const myCustomEvent = defineTypedEvent<number>()('my-custom-event');const myCustomEvent2 = defineTypedEvent<// the event's `.detail` typenumber>()( // the event's `.type` string 'my-custom-event2',); Copy
import {defineTypedEvent} from 'element-vir';const myCustomEvent = defineTypedEvent<number>()('my-custom-event');const myCustomEvent2 = defineTypedEvent<// the event's `.detail` typenumber>()( // the event's `.type` string 'my-custom-event2',);
Define a stand-alone typed event that can be emitted and listened to inside of HTML templates.
Make sure to use currying and call this function twice! (This is required by TypeScript's type parameter inference system.)