Reputation: 404
The below code works on a component to pass an ngrx signal store as a parameter to the component.
listingAddInfoStore = input(inject(ListingAddInfoStore));
I want to make it a required parameter like so
listingAddInfoStore = input.requried<>()
The issue I am running into is the type for input required. I have tried
listingAddInfoStore = input.required<ListingAddInfoStore>()
and
listingAddInfoStore = input.required<typeof ListingAddInfoStore>()
with no luck.
Upvotes: 0
Views: 36
Reputation: 404
Figured it out. Have to use InstanceType
listingAddInfoStore = input.required<InstanceType<typeof ListingAddInfoStore>>();
Upvotes: 0