Open SimeonC opened 1 year ago
It'd be really nice if we could get typegen to infer the meta type as well.
Improvements around this are planned for v5 where we revamp our type definitions as a whole. The goal is to provide as maximum type-safety and inference as possible (sometimes aided by typegen).
Looking forward to v5!! This issue is not blocking me as I worked around it with a factory approach and multiple service names (I only had 2 versions in my real code).
services: {
service1: buildService({ option: 1 }),
service2: buildService({ option: 2 })
}
Here's the TS Playground for an interactive version.
When we use typegen and the service is a invoke object like
{ type: 'Service Name', ...other options }
then the typegen is getting a random string as the service name insetad ofServiceName
(I assume it's getting the object memory reference?).