-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
精读《依赖注入简介》 #440
Comments
能介绍一下为什么spring解决循环依赖设计成3层缓存吗?node里的request.js解决模块的循环依赖只用了1层缓存。 |
我还没有水平可以几句话讲清楚,应该和 AOP 的代理对象创建流程有关,有经验的同学可以评论一下。 |
保证依赖顺序正确那里讲的很棒,感谢分享🙏 |
export type RandomGenerator = () => number;
export const randomNumberImplementation =
({ randomGenerator }: Deps) =>
(max: number): number => {
return Math.floor(randomGenerator() * (max + 1));
};
export const randomNumber = (max: number) =>
randomNumberImplementation(Math.random, max); 这段代码不对吧,上面不是一个 HOC 吗? |
收到
|
@HiWayne 你是指 commonjs 的循环依赖吗 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
精读文章:Dependency Injection in JS/TS – Part 1
了解一下依赖注入思维和实现。
精读《依赖注入简介》
The text was updated successfully, but these errors were encountered: