Examples
import { World } from '@wimaengine/ecs'
import { Events, makeEventClear } from '@wimaengine/event'
import { typeidGeneric } from '@wimaengine/type'
class DamageEvent {}
const eventId = typeidGeneric(Events, [DamageEvent])
const world = new World()
world.setResourceByTypeId(eventId, new Events())
const clearEvents = makeEventClear(eventId)
clearEvents(world)
// EventPlugin normally registers the resource and schedules this system.