I recently started using TypeScript and I have a question about the syntax. I came across some code that defines a parameter like this:
{ [property: string]: any}
I'm a bit confused because I understand that the parameter should be an object and its property should be a string. But can't I just change "property" to any random name, like:
{ [SomeNonSenseName: string]: any}
And it still functions the same way as before, so does the property name really matter if we don't need to reference it? Is this a design flaw in TypeScript?