wip: advanced type safe protection

This commit is contained in:
Supan Adit Pratama 2024-10-29 00:59:35 +07:00
parent d393cb53f6
commit b456c5cc8b
2 changed files with 5 additions and 7 deletions

View File

@ -1,6 +1,7 @@
import { PrismaService } from '../prisma.service'; import { PrismaService } from '../prisma.service';
import { PrismaListProcess } from '../processes/list.process';
export interface PrismaModuleOptions { export interface PrismaModuleOptions {
delegate: (prisma: PrismaService) => any; delegate: (prisma: PrismaService) => any;
processList?: any; processList: typeof PrismaListProcess;
} }

View File

@ -1,15 +1,12 @@
import { PrismaProcess } from '@autocrud/prisma/processes/prisma.process'; import { PrismaListProcess } from '@autocrud/prisma/processes/list.process';
import { ListProcess } from '@autocrud/skeleton/processes/list.process';
export class AppListProcess extends PrismaProcess implements ListProcess {
private data: any;
export class AppListProcess extends PrismaListProcess {
async process(): Promise<any> { async process(): Promise<any> {
console.log('Hello World'); console.log('Hello World');
super.process(); super.process();
} }
result() { result() {
return this.data; return [];
} }
} }