diff --git a/generators/javascript/javascript_generator.ts b/generators/javascript/javascript_generator.ts index 547b7daf7d1..8d3b6158d9e 100644 --- a/generators/javascript/javascript_generator.ts +++ b/generators/javascript/javascript_generator.ts @@ -66,10 +66,8 @@ export enum Order { * JavaScript code generator class. */ export class JavascriptGenerator extends CodeGenerator { - /** - * List of outer-inner pairings that do NOT require parentheses. - */ - ORDER_OVERRIDES: number[][] = [ + /** List of outer-inner pairings that do NOT require parentheses. */ + ORDER_OVERRIDES: [Order, Order][] = [ // (foo()).bar -> foo().bar // (foo())[0] -> foo()[0] [Order.FUNCTION_CALL, Order.MEMBER], diff --git a/generators/javascript/lists.ts b/generators/javascript/lists.ts index 6283f1d274b..e3170cc9733 100644 --- a/generators/javascript/lists.ts +++ b/generators/javascript/lists.ts @@ -303,6 +303,7 @@ export function lists_getSublist( block: Block, generator: JavascriptGenerator, ): [string, Order] { + // Get sublist. // Dictionary of WHEREn field choices and their CamelCase equivalents. const wherePascalCase = { 'FIRST': 'First', @@ -311,7 +312,6 @@ export function lists_getSublist( 'FROM_END': 'FromEnd', }; type WhereOption = keyof typeof wherePascalCase; - // Get sublist. const list = generator.valueToCode(block, 'LIST', Order.MEMBER) || '[]'; const where1 = block.getFieldValue('WHERE1') as WhereOption; const where2 = block.getFieldValue('WHERE2') as WhereOption; diff --git a/generators/python/python_generator.ts b/generators/python/python_generator.ts index 5e5daf9f2e8..f4bef167761 100644 --- a/generators/python/python_generator.ts +++ b/generators/python/python_generator.ts @@ -52,10 +52,8 @@ export enum Order { * PythonScript code generator class. */ export class PythonGenerator extends CodeGenerator { - /** - * List of outer-inner pairings that do NOT require parentheses. - */ - ORDER_OVERRIDES: number[][] = [ + /** List of outer-inner pairings that do NOT require parentheses. */ + ORDER_OVERRIDES: [Order, Order][] = [ // (foo()).bar -> foo().bar // (foo())[0] -> foo()[0] [Order.FUNCTION_CALL, Order.MEMBER],