Is there an alternative way to declare the module-definition for an abstract module such that i can pass a generic to my module options interface? In the example below I have no way of piping through the generic TSchema to provide typings for my drizzle database schema...
import { ConfigurableModuleBuilder } from "@nestjs/common";
import type { DrizzlePlanetScaleModuleOptions } from "./drizzle-planet-scale.types";
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN } =
new ConfigurableModuleBuilder<DrizzlePlanetScaleModuleOptions<TSchema>>()
.setClassMethodName("forRoot")
.setExtras(
{
isGlobal: true,
},
(definition, extras) => ({
...definition,
global: extras.isGlobal,
}),
)
.build();