All you have to do is define your result as a string array, like this:
const result : string[] = [];
Without defining the array type, by default, it will be never. So when you tried to add a string to it, it was a type mismatch, and so it threw the error you saw.