You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once we remove deprecated on IFluidDependecySynthsize, and DependencyContainer we should do the following:
yeah. there is another set of changes coming. once i no longer expose providers directly i can just create the PropertyDescriptions upfront on register, and then all this code will be way simpler. I do those change with what you suggest in the next release
DependencyContainer now takes a generic argument, as it is no longer directly couple to IFluidObject. The ideal pattern here would be directly pass the provider or FluidObject interfaces you will register. As a short term solution you could also pass IFluidObject, but IFluidObject is deprecated, so will need to be removed if used here.
Examples:
// the old way
const dc = new DependencyContainer();
dc.register(IFluidHTMLView, MockLoadable());
// FluidObject option
const dc = new DependencyContainer<FluidObject<IFluidHTMLView>>();
dc.register(IFluidHTMLView, MockLoadable());
// Provider option
const dc = new DependencyContainer<IProvideFluidHTMLView>();
dc.register(IFluidHTMLView, MockLoadable());
// Short term IFluidObject option
const dc = new DependencyContainer<IFluidObject>();
dc.register(IFluidHTMLView, MockLoadable());
The following members have been removed from IFluidDependencySynthesizer:
registeredTypes - unused and no longer supported. has can replace most possible usages
register - create new DependencyContainer and add existing as parent
unregister - create new DependencyContainer and add existing as parent
getProvider - use has and synthesize to check or get provider respectively
The following types have been removed or changed. These changes should only affect direct usages which should be rare. Existing synthesizer api usage is backwards compatible:
FluidObjectKey - removed as IFluidObject is deprecated
NonNullableFluidObject - removed as IFluidObject is deprecated. use typescripts NonNullable instead
AsyncRequiredFluidObjectProvider - Takes FluidObject types rather than keys
AsyncOptionalFluidObjectProvider - Takes FluidObject types rather than keys
AsyncFluidObjectProvider - Takes FluidObject types rather than keys
FluidObjectProvider - Takes FluidObject types rather than keys
ProviderEntry - no longer used
DependencyContainerRegistry - no longer used
fixes#8631
related #8074#8852
Once we remove deprecated on IFluidDependecySynthsize, and DependencyContainer we should do the following:
yeah. there is another set of changes coming. once i no longer expose providers directly i can just create the
PropertyDescriptions
upfront on register, and then all this code will be way simpler. I do those change with what you suggest in the next releaseOriginally posted by @anthony-murphy in #8593 (comment)
The text was updated successfully, but these errors were encountered: