mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 13:23:35 +00:00
Feat/change event api (#553)
* feat: change attribute for given event --------- Co-authored-by: Ary <arylmoraesn@gmail.com> Co-authored-by: arc-alex <ac@omnivox.dk>
This commit is contained in:
committed by
GitHub
parent
78d5d442cf
commit
a01046b479
@@ -14,3 +14,9 @@ export function isOntimeDelay(event: MaybeEvent): event is OntimeDelay {
|
||||
export function isOntimeBlock(event: MaybeEvent): event is OntimeBlock {
|
||||
return event?.type === SupportedEvent.Block;
|
||||
}
|
||||
|
||||
type AnyKeys<T> = keyof T;
|
||||
|
||||
export function isKeyOfType<T extends object>(key: PropertyKey, obj: T): key is AnyKeys<T> {
|
||||
return key in obj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user