请教应该如何绑定一个Extension的Overload方法? #2287
Unanswered
watsonsong
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
我有几个Extension的方法希望绑定到同一个名字上(Extension方法本身可以不同名),通过参数区分开。如果对于成员函数的绑定可以直接使用CombineOverloads和MakeOverload的组合。这种情况有什么办法支持么,能让MakeExtension和CombineOverloads公用的方式。
尝试了把MakeOverload里面的FuncCallWrapper的GetSelfFromData参数给true,然后扩展了OverloadsCombiner上的extensionInfo和callExtension方法。这样导出的.d.ts以及调用都能正确。不知道这样的修改是否有风险?
Beta Was this translation helpful? Give feedback.
All reactions