Take the below code interface and function:

```
interface Target {
  name: String;
  value: String;
}

export const validateInput = (target: Target) => {
  let valid: Object = {
    [target.name]: target.value,
  };
  console.log(valid);
};

```

Why does TS complain about [target.name]?

When I use

> 
> [target.name.toString()]
> 
> 
> 

Is works fine.