Skip to content
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

Reflect metadata 实现 #117

Open
Genluo opened this issue May 24, 2023 · 0 comments
Open

Reflect metadata 实现 #117

Genluo opened this issue May 24, 2023 · 0 comments

Comments

@Genluo
Copy link
Owner

Genluo commented May 24, 2023

Reflect metadata 的实现是:使用内部的一个 WeakMap,利用了 WeakMap 不增加引用计数的特点,将对象作为 Key,元数据集合作为 Value,存到 WeakMap 中去,具体实现为:

WeakMap<any, Map<any, Map<any, any>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant