Babel macro that automatically generates an array of keys from a given object type (very much WIP).
- [x] Implement tests
- [x] Support type references (e.g.
keysof<IProps>
) - [ ] Support index accessed types
- [ ] Support imported types
import keysof from "ts-keysof.macro";
type Person = { name: string; age: number };
const personKeys = keysof<Person>(); // ["name", "age"]