Closed waptik closed 8 months ago
Hello, dynamically including relations doesn't really work unfortunately, because TypeScript cannot then statically infer the types.
I think your approach can be made to work by adding some type constraints to the Include
type, such that it would be Include extends X ...
instead of just the strings chats
etc.
So i'm creating a helper function that will include relations on demand. The issue is that with my approach, the relations are not included in the output
I get the following intellisense typescript error in vscode when i hover to chats in
project.chats