@blitzjs/installer
Version:
Package installation for the Blitz CLI
18 lines (17 loc) • 537 B
TypeScript
import { Model } from '@mrleebo/prisma-ast';
/**
* Adds an enum to your schema.prisma data model.
*
* @param source - schema.prisma source file contents
* @param modelProps - the model to add
* @returns The modified schema.prisma source
* @example Usage
* ```
* addPrismaModel(source, {
type: "model",
name: "Project",
properties: [{type: "field", name: "id", fieldType: "String"}],
})
* ```
*/
export declare function addPrismaModel(source: string, modelProps: Model): Promise<string>;