UNPKG

@adonis-cockpit/lucid-infer

Version:

Package to infer Lucid model attributes by parsing AST tree

14 lines (13 loc) 601 B
import { ClassProperty, Node, TSType } from "@babel/types"; import { ColumnType } from "./types.js"; export declare function getColumnsFromAST(ast: Node): ClassProperty[]; export declare function getDefaultExportFromAST(ast: Node): import("@babel/types").ExportDefaultDeclaration | undefined; export declare function isClassPropertyNullable(property: ClassProperty): boolean; export declare function getColumnType(property: ClassProperty): { isArray: boolean; type: ColumnType; }; export declare function getColumnTypeFromTSType(type: TSType): { isArray: boolean; type: ColumnType; };