Skip to content

defineEvent

defineEvent<T>(event): T

Identity helper for authoring an event config inline: returns event unchanged but preserves its literal type, so a plugin config’s extra fields don’t trip EventConfig’s excess-property check (id / title / type stay required). Where you have a plugin’s own event interface, prefer typing with it.

T extends EventConfig

T

T

cal.addGroup({
id: "g",
events: [
defineEvent({ type: "lunar", id: "tet", title: "Tết", lunarMonth: 1, lunarDay: 1 }),
],
});