@adonis-cockpit/lucid-infer
Version:
Package to infer Lucid model attributes by parsing AST tree
33 lines (19 loc) • 1.24 kB
Markdown
<div align="center">
<br/>
## @adonis-cockpit/lucid-infer
### Infer Lucid model attributes by parsing AST tree
<br/>
</div>
<div align="center">
<!-- automd:badges color="brightgreen" license name="@adonis-cockpit/lucid-infer" bundlephobia packagephobia -->
[](https://npmjs.com/package/@adonis-cockpit/lucid-infer)
[](https://npm.chart.dev/@adonis-cockpit/lucid-infer)
[](https://bundlephobia.com/package/@adonis-cockpit/lucid-infer)
[](https://packagephobia.com/result?p=@adonis-cockpit/lucid-infer)
<!-- /automd -->
</div>
## Description
Typescript reflection system is limited and as soon as we used `null`, `undefined`, arrays or more complex types, we lose the information.
This library works by parsing the class AST tree to retrieve all the required information about the model columns.
## License
[MIT licensed](LICENSE.md).