UNPKG

683 BJavaScriptView Raw
1// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead
2export var tuple = function tuple() {
3 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
4 args[_key] = arguments[_key];
5 }
6
7 return args;
8};
9export var tupleNum = function tupleNum() {
10 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
11 args[_key2] = arguments[_key2];
12 }
13
14 return args;
15};
16export var withInstall = function withInstall(comp) {
17 var c = comp;
18
19 c.install = function (app) {
20 app.component(c.displayName || c.name, comp);
21 };
22
23 return comp;
24};
\No newline at end of file