chore: improve convention entry <> event

This commit is contained in:
Carlos Valente
2025-04-17 12:40:32 +02:00
committed by arc-alex
parent 3754c374c3
commit 3118c20719
28 changed files with 245 additions and 245 deletions
@@ -1,4 +1,4 @@
import { EndAction, EntryCustomFields, OntimeEvent, SupportedEvent, TimerType, TimeStrategy } from 'ontime-types';
import { EndAction, EntryCustomFields, OntimeEvent, SupportedEntry, TimerType, TimeStrategy } from 'ontime-types';
import { cloneEvent } from '../eventsManager';
@@ -6,7 +6,7 @@ describe('cloneEvent()', () => {
it('creates a stem from a given event', () => {
const original: OntimeEvent = {
id: 'unique',
type: SupportedEvent.Event,
type: SupportedEntry.Event,
title: 'title',
cue: 'cue',
note: 'note',
@@ -38,7 +38,7 @@ describe('cloneEvent()', () => {
expect(cloned.custom).not.toBe(original.custom);
expect(cloned).toMatchObject({
type: SupportedEvent.Event,
type: SupportedEntry.Event,
title: original.title,
note: original.note,
timeStart: original.timeStart,
@@ -1,4 +1,4 @@
import { OntimeEvent, SupportedEvent } from 'ontime-types';
import { OntimeEvent, SupportedEntry } from 'ontime-types';
/**
* @description Creates a safe duplicate of an event
@@ -9,7 +9,7 @@ import { OntimeEvent, SupportedEvent } from 'ontime-types';
type ClonedEvent = Omit<OntimeEvent, 'id' | 'cue'>;
export const cloneEvent = (event: OntimeEvent): ClonedEvent => {
return {
type: SupportedEvent.Event,
type: SupportedEntry.Event,
title: event.title,
note: event.note,
timeStart: event.timeStart,