We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
<script> (function (window) { var root = {}; function Number() { }; Number.prototype.show = function () { console.log("this is root.Number not window.Number"); }; root.Number = Number; window.test = root; })(window); </script> <script> (function (window) { console.log(Number === test.Number); //false var funcTest = overload([test.Number], function (num) { num.show(); }).when([Number], function (num) { console.log(num); }); funcTest(1); //error TypeError: num.show is not a function })(window); </script>
The text was updated successfully, but these errors were encountered:
How about Use obj.constructor === type to solve this problem in Overload.js
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: