math.gl
math.gl copied to clipboard
Use tuple type for arrays of fixed width
An example function: getMapCenterByLngLatPosition, says in the JSDoc comment that it will return an array with two elements in it [lng,lat], but is typed as an array of numbers.
Typing it as [number, number] tuple would improve the help TypeScript can give, while also not being a breaking change(?)
https://www.typescriptlang.org/docs/handbook/2/objects.html#tuple-types
I am willing to go through and create a PR with the changes if you also feel they would improve the quality of the library.