axiomhq / axiom-js

Official language bindings and library extensions for Axiom
https://axiom.co
MIT License
89 stars 14 forks source link

Fix return type of list datasets #105

Closed DaniFoldi closed 9 months ago

DaniFoldi commented 10 months ago

In Typescript, arrays are typed as T[] (or Array<T>), [T] means a tuple where the first element is type T. The example didn't catch this as at runtime they are represented as arrays (and therefore iterable the same way), however assignments are typechecked so the array length and element types are restricted to what is defined in the tuple.