1+ import { Tuple } from './types' ;
2+
13/**
24 * Builder class for providing variable overrides.
35 * Supports type-safe methods for setting various Starlark-compatible types.
@@ -8,10 +10,10 @@ export class OverridesBuilder {
810 /**
911 * Sets a variable override with automatic type inference.
1012 * @param key - The variable name
11- * @param value - The value (string, number, boolean, array, or object)
13+ * @param value - The value (string, number, boolean, array, Set, Tuple, or object)
1214 * @returns this for method chaining
1315 */
14- set ( key : string , value : string | number | boolean | any [ ] | Record < string , any > | Map < any , any > ) : this {
16+ set ( key : string , value : string | number | boolean | any [ ] | Set < any > | Tuple | Record < string , any > | Map < any , any > ) : this {
1517 this . overrides . set ( key , value ) ;
1618 return this ;
1719 }
@@ -66,6 +68,28 @@ export class OverridesBuilder {
6668 return this . set ( key , value ) ;
6769 }
6870
71+ /**
72+ * Sets a tuple variable override.
73+ * In Starlark, tuples are immutable sequences written as (item1, item2, ...).
74+ * @param key - The variable name
75+ * @param value - Tuple value
76+ * @returns this for method chaining
77+ */
78+ setTuple ( key : string , value : Tuple ) : this {
79+ return this . set ( key , value ) ;
80+ }
81+
82+ /**
83+ * Sets a set variable override.
84+ * In Starlark, sets use the set() builtin function: set([item1, item2, ...]).
85+ * @param key - The variable name
86+ * @param value - Set value
87+ * @returns this for method chaining
88+ */
89+ setSet ( key : string , value : Set < any > ) : this {
90+ return this . set ( key , value ) ;
91+ }
92+
6993 /**
7094 * Gets all variable overrides.
7195 * @returns A copy of the overrides map
0 commit comments