I have a method like this.
private getStuff(data: string[]) : CertainType[] { ... }
I decided that it makes more sense to have the output in form of a dictionary (C#'ish) than an array. As far my google-foo tells me, I should use an object and put in stuff into it with the ID as the fields' names. So instead of:
const things: Thing[]; ...
things = [];
output.push(thingy);
console.log(things[3]);
I'm doing this:
const stuff: any; ...
stuff = { };
stuff[3] = stuffy;
console.log(things[3]);
So the signature of the method changed to this.
private getStuff(data: string[]) : any { ... }
It all works just dandy but. I like the semi-hard typed variables in TypeScript and coming from C# I strongly believe in avoiding a lot of issues by being (seemingly) nit-picky in advance (without getting within range of PO. of course).
Since the number of properties isn't known in advance, nor are their IDs, I wonder if any is the closest type setting or if there's something corresponding to the syntax of C# as:
Dictionary<string, Thing> dicky;