11import { DMMF } from '@prisma/client/runtime/library' ;
22import AwaitEventEmitter from 'await-event-emitter' ;
33import { Project , SourceFile } from 'ts-morph' ;
4+ import type { WritableDeep } from 'type-fest' ;
45
56import { createConfig } from './helpers/create-config' ;
67import { ObjectSettings } from './helpers/object-settings' ;
78
8- export type InputType = DMMF . InputType ;
9+ export type InputType = WritableDeep < DMMF . InputType > ;
910export type FieldLocation = DMMF . FieldLocation ;
10- export type OutputType = DMMF . OutputType ;
11- export type SchemaField = DMMF . SchemaField ;
11+ export type OutputType = WritableDeep < DMMF . OutputType > ;
12+ export type SchemaField = WritableDeep < DMMF . SchemaField > ;
1213export type SchemaEnum = DMMF . SchemaEnum ;
13- export type Model = DMMF . Model ;
14+ export type Model = WritableDeep < DMMF . Model > ;
15+ export type SchemaArg = WritableDeep < DMMF . SchemaArg > ;
16+ export type Schema = WritableDeep < DMMF . Schema > ;
17+ export type Document = WritableDeep < DMMF . Document > ;
1418
1519export type FieldOutputType = SchemaField [ 'outputType' ] ;
1620
@@ -28,7 +32,7 @@ export type TypeRecord = Partial<{
2832export type GeneratorConfiguration = ReturnType < typeof createConfig > ;
2933
3034export type EventArguments = {
31- schema : DMMF . Schema ;
35+ schema : Schema ;
3236 models : Map < string , Model > ;
3337 modelNames : string [ ] ;
3438 modelFields : Map < string , Map < string , Field > > ;
0 commit comments