I have a function that returns Provider[]
. I use it to apply some predefined providers to a component. While writing tests for that function, I realized that Injector.create
will not accept Provider[]
, but StaticProvider[]
. Now, I see that difference in interface, but I don't understand difference in behavior. If I change my function to return StaticProvider[]
(that requires change from Type
to ConstructorProvider
), nothing really change and all of my tests are passing. Same happens if I cast return value to StaticProvider[]
for injector.
So I was wondering, what is actual change in behavior between the two, If it doesn't matter which one I use for my use case.
docs links: