From 1a9aa43d5ce205b9b8f8f005b688204bbe3efd96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <michael@minelli.me> Date: Thu, 12 Oct 2023 21:47:08 +0200 Subject: [PATCH] AssignmentHelper => Update validate for optional properties of immutables --- helpers/Dojo/SharedAssignmentHelper.ts | 6 ++++-- types/Dojo/ImmutableFileDescriptor.ts | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/helpers/Dojo/SharedAssignmentHelper.ts b/helpers/Dojo/SharedAssignmentHelper.ts index 007f7bf..8b52f8a 100644 --- a/helpers/Dojo/SharedAssignmentHelper.ts +++ b/helpers/Dojo/SharedAssignmentHelper.ts @@ -15,9 +15,11 @@ class SharedAssignmentHelper { immutable: { elements: { - properties: { + properties : { + path: { type: 'string' } + }, + optionalProperties: { description: { type: 'string' }, - path : { type: 'string' }, isDirectory: { type: 'boolean' } } } diff --git a/types/Dojo/ImmutableFileDescriptor.ts b/types/Dojo/ImmutableFileDescriptor.ts index 4a05c25..4597de7 100644 --- a/types/Dojo/ImmutableFileDescriptor.ts +++ b/types/Dojo/ImmutableFileDescriptor.ts @@ -1,7 +1,7 @@ interface ImmutableFileDescriptor { - description: string, + description?: string, path: string, - isDirectory: boolean, + isDirectory?: boolean, } -- GitLab