From 89549dfa0811d7df7d52c9adc283667913f708ff Mon Sep 17 00:00:00 2001 From: thetek Date: Tue, 9 Apr 2024 19:02:51 +0200 Subject: [PATCH] fix: MessageId and Id distinction --- schema-types.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/schema-types.ts b/schema-types.ts index 8040bdf..c28ece9 100644 --- a/schema-types.ts +++ b/schema-types.ts @@ -11,7 +11,7 @@ export type SimToCmMessage = { export type Message = RequestApprovalToAttack | AcaFuelLow | MissileToOwnshipDetected | AcaDefect | AcaHeadingToBase; export type BaseMessage = { - id: Id, + id: MessageId, priority: Priority, kind: TKind, data: TData, @@ -51,7 +51,8 @@ export type AcaHeadingToBase = BaseMessage<"AcaHeadingToBase", { /* utility types **********************************************************************************/ -export type Id = string & tags.Format<"uuid">; +export type Id = number & tags.Type<"uint64">; +export type MessageId = string & tags.Format<"uuid">; export type Priority = number & tags.Type<"uint32"> & tags.Maximum<10>; export type Range = number & tags.Type<"float"> & tags.Minimum & tags.Maximum;