Hi there! I found a minor DX issue in the generated Typescript definitions (which are incredibly cool, by the way).
I’ve got a rating field in my base:
When writing scripting to update it, I’ve got an await input.buttonsAsync
where each item is has a value and label: { label: "⭐⭐⭐⭐", value: 4 }
, etc.
The selected button goes into a payload object that’s eventually passed to table.updateRecordAsync
. The actual script works flawlessly, but there’s a TS error:
Type "number" is not assignable to type '0 | 1 | 2 | 3 | 4'
I tried to add a type assertion, but apparently the script input isn’t a TS file. I think the fix is as simple as demoting the Rating
type to accept numbers instead of a specific set of numbers.
Not a big deal, since the error doesn’t affect execution, but I figured I’d flag. Thanks!