bendrucker/snakecase-keys

Types defined using `interface` are not valid

Opened this issue · 1 comments

type Camel = {
  myName: string;
};

type Snake = SnakeCaseKeys<Camel>; // Snake is `{ my_name: string; }`

While

interface Camel {
  myName: string;
};

type Snake = SnakeCaseKeys<Camel>; // Snake is `{ myName: string; }`, this is not correct

This issue also exists in camelcase-keys

I believe it's probably the same issue as the one mentioned below. There seems to be a tricky solution? outlined in that issue.

sindresorhus/camelcase-keys#114