From 3c9568a6976e0fa072afd9a3acbcef5a1c27e806 Mon Sep 17 00:00:00 2001 From: John Nesky Date: Fri, 20 Sep 2024 14:40:22 -0700 Subject: [PATCH] Addressing PR review comments. --- blocks/lists.ts | 17 ++++------------- blocks/text.ts | 5 +---- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/blocks/lists.ts b/blocks/lists.ts index e92a62839f..794cb662da 100644 --- a/blocks/lists.ts +++ b/blocks/lists.ts @@ -417,10 +417,7 @@ const LISTS_GETINDEX = { options: this.WHERE_OPTIONS, }) as FieldDropdown; menu.setValidator( - /** - * @param value The input value. - * @returns Null if the field has been replaced; otherwise undefined. - */ + /** @param value The input value. */ function (this: FieldDropdown, value: string) { const oldValue: string | null = this.getValue(); const oldAt = oldValue === 'FROM_START' || oldValue === 'FROM_END'; @@ -645,10 +642,7 @@ const LISTS_SETINDEX = { options: this.WHERE_OPTIONS, }) as FieldDropdown; menu.setValidator( - /** - * @param value The input value. - * @returns Null if the field has been replaced; otherwise undefined. - */ + /** @param value The input value. */ function (this: FieldDropdown, value: string) { const oldValue: string | null = this.getValue(); const oldAt = oldValue === 'FROM_START' || oldValue === 'FROM_END'; @@ -816,11 +810,8 @@ const LISTS_GETSUBLIST = { this[('WHERE_OPTIONS_' + n) as 'WHERE_OPTIONS_1' | 'WHERE_OPTIONS_2'], }) as FieldDropdown; menu.setValidator( - /** - * @param value The input value. - * @returns Null if the field has been replaced; otherwise undefined. - */ - function (this: FieldDropdown, value: string) { + /** @param value The input value. */ + function (this: FieldDropdown, value: string) { const oldValue: string | null = this.getValue(); const oldAt = oldValue === 'FROM_START' || oldValue === 'FROM_END'; const newAt = value === 'FROM_START' || value === 'FROM_END'; diff --git a/blocks/text.ts b/blocks/text.ts index 318c5dd862..a7ad5374ac 100644 --- a/blocks/text.ts +++ b/blocks/text.ts @@ -223,10 +223,7 @@ const GET_SUBSTRING_BLOCK = { this[('WHERE_OPTIONS_' + n) as 'WHERE_OPTIONS_1' | 'WHERE_OPTIONS_2'], }) as FieldDropdown; menu.setValidator( - /** - * @param value The input value. - * @returns Null if the field has been replaced; otherwise undefined. - */ + /** @param value The input value. */ function (this: FieldDropdown, value: any): null | undefined { const oldValue: string | null = this.getValue(); const oldAt = oldValue === 'FROM_START' || oldValue === 'FROM_END';