While the article does advocate for objects vs arrays for returning multiple values I wanted to address the second part of you comment.
It will work just fine in TypeScript, where you can define a "fixed size" array as a type:
type Test = [number, string];
const test: Test = [1, 'something'];
The second line will fail compilation if there's a different number of elements in that array, or if the types don't match.