Code generation from TS type aliases
Open
- Dominant language
- TypeScript
- Stars
- 68
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
TS exposes [custom transformers](https://github.com/Microsoft/TypeScript/issues/13764) through the public API, so it should be possible to create generates purely from a type alias. I've done something like before with [babel as Flow](https://github.com/unbounce/babel-plugin-transform-flow-to-gen).
```ts
import { fromType } from 'kitimat-type-to-gen';
const person = fromType();
// would expand to something like...
const kitimat = require('kitimat-jest');
const person = kitimat.object({
name: kitimat.string(),
age: kitimat.posInt(),
// ... etc
});
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.