From cc73b724a1f91dd55caa5a57ccaba9d12925a83c Mon Sep 17 00:00:00 2001 From: Elena Schramme Date: Thu, 4 Apr 2024 10:35:45 -0700 Subject: [PATCH] first type definitions for restrainer --- src/prototype/useRestrainer.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/prototype/useRestrainer.ts b/src/prototype/useRestrainer.ts index e4f7f4b..896bd6e 100644 --- a/src/prototype/useRestrainer.ts +++ b/src/prototype/useRestrainer.ts @@ -1,9 +1,37 @@ +import { Widget } from "src/types/modalities"; + type RestrainerProps = { // define expected input here and it's type (number, string, etc.) visualComplexity: number; + audioComplexity: number; + widgets: {[key: string]: Widget}; // add more as needed }; +type ModalityMeasureRange = { + min: number; + max: number; +}; + +type ModalityMeasureBoundary = { + min: number; + max: number; +}; + +type ModalityMeasure = { + // for now it only takes into account how many visual and audio modalities are used + /** + * or use array instead of number and use objects with attributes such as volume, frequency + * amount of audios playing at the same time for example can be seen by the amout of objects in the list + */ + Visual: number; + Audio: number; + range: ModalityMeasureRange; + boundary: ModalityMeasureBoundary; +}; + + + /** * @description ??? * @param ???