Enabling shorter import paths [automatic]

This commit is contained in:
ts_ci
2021-03-06 22:07:42 +00:00
parent 714fec0bf3
commit cb9e085c3a
121 changed files with 21641 additions and 223 deletions

View File

@ -0,0 +1,2 @@
import "minimal-polyfills/Object.fromEntries";
export declare function allPropertiesValuesToUndefined<T extends Record<string, unknown>>(obj: T): Record<keyof T, undefined>;

View File

@ -0,0 +1,29 @@
"use strict";
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.allPropertiesValuesToUndefined = void 0;
require("minimal-polyfills/Object.fromEntries");
function allPropertiesValuesToUndefined(obj) {
return Object.fromEntries(Object.entries(obj)
.map(function (_a) {
var _b = __read(_a, 1), key = _b[0];
return [key, undefined];
}));
}
exports.allPropertiesValuesToUndefined = allPropertiesValuesToUndefined;
//# sourceMappingURL=allPropertiesValuesToUndefined.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"allPropertiesValuesToUndefined.js","sourceRoot":"","sources":["../../src/lib/tools/allPropertiesValuesToUndefined.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,gDAA8C;AAE9C,SAAgB,8BAA8B,CAAoC,GAAM;IACpF,OAAO,MAAM,CAAC,WAAW,CACrB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;SACd,GAAG,CAAC,UAAC,EAAK;YAAL,KAAA,aAAK,EAAJ,GAAG,QAAA;QAAM,OAAA,CAAC,GAAG,EAAE,SAAS,CAAC;IAAhB,CAAgB,CAAC,CACjC,CAAC;AACb,CAAC;AALD,wEAKC"}

7
lib/tools/appendHead.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
export declare function appendHead(params: {
type: "css";
href: string;
} | {
type: "javascript";
src: string;
}): Promise<void>;

32
lib/tools/appendHead.js Normal file
View File

@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.appendHead = void 0;
var Deferred_1 = require("evt/tools/Deferred");
function appendHead(params) {
var htmlElement = document.createElement((function () {
switch (params.type) {
case "css": return "link";
case "javascript": return "script";
}
})());
var dLoaded = new Deferred_1.Deferred();
htmlElement.addEventListener("load", function () { return dLoaded.resolve(); });
Object.assign(htmlElement, (function () {
switch (params.type) {
case "css": return {
"href": params.href,
"type": "text/css",
"rel": "stylesheet",
"media": "screen,print"
};
case "javascript": return {
"src": params.src,
"type": "text/javascript",
};
}
})());
document.getElementsByTagName("head")[0].appendChild(htmlElement);
return dLoaded.pr;
}
exports.appendHead = appendHead;
//# sourceMappingURL=appendHead.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"appendHead.js","sourceRoot":"","sources":["../../src/lib/tools/appendHead.ts"],"names":[],"mappings":";;;AACA,+CAA8C;AAE9C,SAAgB,UAAU,CACtB,MAMC;IAGD,IAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CACtC,CAAC;QACG,QAAQ,MAAM,CAAC,IAAI,EAAE;YACjB,KAAK,KAAK,CAAC,CAAC,OAAO,MAAM,CAAC;YAC1B,KAAK,YAAY,CAAC,CAAC,OAAO,QAAQ,CAAC;SACtC;IACL,CAAC,CAAC,EAAE,CACP,CAAC;IAEF,IAAM,OAAO,GAAG,IAAI,mBAAQ,EAAQ,CAAC;IAErC,WAAW,CAAC,gBAAgB,CAAC,MAAM,EAAE,cAAM,OAAA,OAAO,CAAC,OAAO,EAAE,EAAjB,CAAiB,CAAC,CAAC;IAE9D,MAAM,CAAC,MAAM,CACT,WAAW,EACX,CAAC;QACG,QAAQ,MAAM,CAAC,IAAI,EAAE;YACjB,KAAK,KAAK,CAAC,CAAC,OAAO;gBACf,MAAM,EAAE,MAAM,CAAC,IAAI;gBACnB,MAAM,EAAE,UAAU;gBAClB,KAAK,EAAE,YAAY;gBACnB,OAAO,EAAE,cAAc;aAC1B,CAAC;YACF,KAAK,YAAY,CAAC,CAAC,OAAO;gBACtB,KAAK,EAAE,MAAM,CAAC,GAAG;gBACjB,MAAM,EAAE,iBAAiB;aAC5B,CAAC;SACL;IACL,CAAC,CAAC,EAAE,CACP,CAAC;IAEF,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAElE,OAAO,OAAO,CAAC,EAAE,CAAC;AAEtB,CAAC;AA7CD,gCA6CC"}

1
lib/tools/assert.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export { assert } from "evt/tools/typeSafety/assert";

6
lib/tools/assert.js Normal file
View File

@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.assert = void 0;
var assert_1 = require("evt/tools/typeSafety/assert");
Object.defineProperty(exports, "assert", { enumerable: true, get: function () { return assert_1.assert; } });
//# sourceMappingURL=assert.js.map

1
lib/tools/assert.js.map Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../../src/lib/tools/assert.ts"],"names":[],"mappings":";;;AACA,sDAAqD;AAA5C,gGAAA,MAAM,OAAA"}