Hi, I was wondering if the following is some limitation of TypeScript or if I'm doing sth. wrong.
I have the following library code:
// from PrimeNG, I can't change that:
class DynamicDialogConfig<DataType = any, InputValuesType extends Record<string, any> = {}>{
data?: DataType;
inputValues?: InputValuesType;
}
and using it like this:
interface WetternutzerDialogData {
nutzer: INutzer;
}
config = inject(DynamicDialogConfig<WetternutzerDialogData>) ;
resolves in config: DynamicDialogConfig<any, any> - I could cast that but... is there a better way?
When I use it like this
const b = config.data.nutzer
nutzer gets highlighted but I don't get an error if I mistype it