import { expectError } from 'tsd' ; import { PrismaClient } from '.' ; const prisma = new PrismaClient ( { datasources : { db : { url : 'file:dev.db' , } , } , } ) ; ( async ( ) => { expectError ( await prisma . user . groupBy ( { where : { age : { gt : - 1 , } , } , orderBy : [ { name : 'desc' , } , ] , skip : 0 , take : 10000 , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ ] , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'name' ] , where : { age : { gt : - 1 , } , } , skip : 0 , take : 10000 , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'name' ] , where : { age : { gt : - 1 , } , } , skip : 0 , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'name' ] , where : { age : { gt : - 1 , } , } , take : 10000 , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'name' ] , orderBy : { age : 'desc' , } , where : { age : { gt : - 1 , } , } , take : 10000 , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'name' ] , orderBy : { age : 'desc' , } , where : { age : { gt : - 1 , } , } , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'name' ] , orderBy : { age : 'desc' , } , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'email' ] , orderBy : [ { age : 'desc' , } , ] , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'email' ] , having : { email : '' , name : '' , } , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'email' ] , having : { email : '' , OR : { name : '' , } , } , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'email' ] , having : { email : '' , OR : [ { name : '' , } , ] , } , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'email' ] , having : { email : '' , AND : { name : '' , } , } , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'email' ] , having : { email : '' , AND : [ { name : '' , } , ] , } , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'email' ] , having : { email : '' , NOT : { name : '' , } , } , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'email' ] , having : { email : '' , NOT : [ { email : '' , } , { name : '' , } , ] , } , } ) ) ; expectError ( await prisma . user . groupBy ( { by : [ 'email' ] , having : { email : '' , NOT : { AND : [ { OR : [ { email : '' , } , { name : '' , } , ] , } , ] , } , } , } ) ) ; } ) ( ) ;