-
Notifications
You must be signed in to change notification settings - Fork 0
/
parametrize.min.js
1 lines (1 loc) · 1.2 KB
/
parametrize.min.js
1
"use strict";!function(t,n){var u="\\",c=!1,f={},l={},r={new:s,get:s,set:s,strict:function(t){c=t,console.warn("parametrize strict mode is set to "+c)}};function s(r,t,n){if(!l[r]){var e=(i=r,function(){var t=function(n,t){var r=[].map.call(t,function(t){return t.constructor.name}),e=void 0;try{if(!r.length)return f[n][u];e=function(t,n){for(var r=t,e=0;e<n.length;e++)r=r[n[e]];return r}(f,[n].concat(r))}catch(t){if(c)throw TypeError("Calling '"+n+"' with argument types ["+r.join(", ")+"] doesn't match any defined signature.");e=f[n][u]}return e}(i,arguments);return t.apply(this,arguments)}),o=c?function(t){throw TypeError("Calling '"+t+"' with argument types [] doesn't match any defined signature.")}.bind(null,r):function(){};d(f,[r,u],o),e.parametrize=e.overload=function(t,n){return s(r,t,n)},l[r]=e}var i;if(!n)return t&&d(f,[r,u],t),l[r];var a=t.map(function(t){return t.name});return d(f,[r].concat(a),n),l[r]}function d(t,n,r){for(var e,o=t,i=0;i<n.length-1;i++)o=o[n[i]]?o[n[i]]:o[n[i]]={};return e=r,"[object Object]"===Object.prototype.toString.call(e)?(o[n[i]]=o[n[i]]||{},Object.assign(o[n[i]],r)):o[n[i]]=r,t}n?t.exports=r:t.Func=r}("undefined"!=typeof module?module:window,"undefined"!=typeof module);