@mxfb/tools 0.3.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/TODO.md +1 -0
  2. package/agnostic/@publisher/index.d.ts +47 -0
  3. package/agnostic/@publisher/index.js +361 -0
  4. package/agnostic/elo/index.d.ts +23 -0
  5. package/agnostic/elo/index.js +28 -0
  6. package/agnostic/elo/index.test.d.ts +1 -0
  7. package/agnostic/elo/index.test.js +67 -0
  8. package/agnostic/index.d.ts +5 -4
  9. package/agnostic/index.js +5 -0
  10. package/agnostic/poetry/generate-rhymes/index.d.ts +1 -0
  11. package/agnostic/poetry/generate-rhymes/index.js +125 -0
  12. package/agnostic/poetry/index.d.ts +1 -0
  13. package/agnostic/poetry/index.js +1 -0
  14. package/agnostic/scrapers/@meteociel/index.d.ts +36 -0
  15. package/agnostic/scrapers/@meteociel/index.js +248 -0
  16. package/agnostic/scrapers/@meteociel/index.test.d.ts +1 -0
  17. package/agnostic/scrapers/@meteociel/index.test.js +43 -0
  18. package/agnostic/scrapers/@meteociel/locations/index.d.ts +11 -0
  19. package/agnostic/scrapers/@meteociel/locations/index.js +10 -0
  20. package/agnostic/scrapers/@meteociel/types.d.ts +1 -0
  21. package/agnostic/scrapers/@meteociel/types.js +1 -0
  22. package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.d.ts +22 -0
  23. package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.js +124 -0
  24. package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.test.d.ts +1 -0
  25. package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.test.js +107 -0
  26. package/agnostic/scrapers/@tumblr/blogs/index.d.ts +8 -0
  27. package/agnostic/scrapers/@tumblr/blogs/index.js +23 -0
  28. package/agnostic/scrapers/@tumblr/index.d.ts +73 -0
  29. package/agnostic/scrapers/@tumblr/index.js +180 -0
  30. package/agnostic/scrapers/@tumblr/index.test.d.ts +1 -0
  31. package/agnostic/scrapers/@tumblr/index.test.js +319 -0
  32. package/agnostic/scrapers/@tumblr/types.d.ts +238 -0
  33. package/agnostic/scrapers/@tumblr/types.js +38 -0
  34. package/agnostic/scrapers/@tumblr/utils.d.ts +12 -0
  35. package/agnostic/scrapers/@tumblr/utils.js +407 -0
  36. package/agnostic/scrapers/index.d.ts +2 -0
  37. package/agnostic/scrapers/index.js +2 -0
  38. package/agnostic/weather/index.d.ts +1 -0
  39. package/agnostic/weather/index.js +1 -0
  40. package/agnostic/weather/types.d.ts +181 -0
  41. package/agnostic/weather/types.js +8 -0
  42. package/components/index.d.ts +1 -1
  43. package/components/index.js +1 -0
  44. package/components/public-classnames.d.ts +5 -0
  45. package/components/public-classnames.js +5 -0
  46. package/components/utils/index.d.ts +1 -0
  47. package/components/utils/index.js +12 -0
  48. package/components/utils/types.d.ts +3 -0
  49. package/components/utils/types.js +1 -0
  50. package/index.d.ts +3 -3
  51. package/index.js +3 -0
  52. package/node/headless-browser/index.d.ts +37 -0
  53. package/node/headless-browser/index.js +126 -0
  54. package/node/headless-browser/types.d.ts +47 -0
  55. package/node/headless-browser/types.js +5 -0
  56. package/node/index.d.ts +1 -2
  57. package/node/index.js +1 -0
  58. package/node/index.test.d.ts +1 -0
  59. package/node/index.test.js +6 -0
  60. package/node/scrapers/@tumblr/index.d.ts +61 -0
  61. package/node/scrapers/@tumblr/index.js +182 -0
  62. package/node/scrapers/@tumblr/index.test.d.ts +1 -0
  63. package/node/scrapers/@tumblr/index.test.js +185 -0
  64. package/node/scrapers/@tumblr/types.d.ts +91 -0
  65. package/node/scrapers/@tumblr/types.js +1 -0
  66. package/node/scrapers/@tumblr/utils.d.ts +23 -0
  67. package/node/scrapers/@tumblr/utils.js +328 -0
  68. package/node/scrapers/index.d.ts +1 -0
  69. package/node/scrapers/index.js +1 -0
  70. package/package.json +211 -14
  71. package/agnostic/_WIP_tennis/index.d.ts +0 -2
  72. package/agnostic/_WIP_tennis/index.js +0 -62
  73. package/agnostic/arrays/index.d.ts +0 -11
  74. package/agnostic/arrays/is-array-of/index.d.ts +0 -5
  75. package/agnostic/arrays/is-array-of/index.js +0 -23
  76. package/agnostic/async/index.d.ts +0 -8
  77. package/agnostic/async/index.js +0 -20
  78. package/agnostic/async/timeout-call/index.d.ts +0 -1
  79. package/agnostic/async/timeout-call/index.js +0 -6
  80. package/agnostic/async/transitions/index.d.ts +0 -41
  81. package/agnostic/async/transitions/index.js +0 -7
  82. package/agnostic/async/wait/index.d.ts +0 -1
  83. package/agnostic/async/wait/index.js +0 -6
  84. package/agnostic/booleans/index.d.ts +0 -8
  85. package/agnostic/booleans/index.js +0 -17
  86. package/agnostic/booleans/is-falsy/index.d.ts +0 -7
  87. package/agnostic/booleans/is-falsy/index.js +0 -11
  88. package/agnostic/css/bem/BEM.d.ts +0 -29
  89. package/agnostic/css/bem/getNamesArr.d.ts +0 -2
  90. package/agnostic/css/bem/index.d.ts +0 -7
  91. package/agnostic/css/bem/index.js +0 -9
  92. package/agnostic/css/generate-nice-color/index.d.ts +0 -2
  93. package/agnostic/css/generate-nice-color/index.js +0 -8
  94. package/agnostic/css/index.d.ts +0 -14
  95. package/agnostic/css/index.js +0 -177
  96. package/agnostic/css/is-valid-css-class-name/index.d.ts +0 -2
  97. package/agnostic/css/is-valid-css-class-name/index.js +0 -8
  98. package/agnostic/css/styles-set/index.d.ts +0 -37
  99. package/agnostic/errors/index.d.ts +0 -30
  100. package/agnostic/errors/index.js +0 -6
  101. package/agnostic/html/get-node-ancestors/index.d.ts +0 -1
  102. package/agnostic/html/get-node-ancestors/index.js +0 -6
  103. package/agnostic/html/get-position-inside-parent/index.d.ts +0 -1
  104. package/agnostic/html/get-position-inside-parent/index.js +0 -6
  105. package/agnostic/html/index.d.ts +0 -17
  106. package/agnostic/html/index.js +0 -39
  107. package/agnostic/html/insert-node/index.d.ts +0 -2
  108. package/agnostic/html/insert-node/index.js +0 -6
  109. package/agnostic/html/placeholders/index.d.ts +0 -9
  110. package/agnostic/html/placeholders/index.js +0 -6
  111. package/agnostic/html/sanitize/index.d.ts +0 -24
  112. package/agnostic/html/sanitize/index.js +0 -9
  113. package/agnostic/html/selector-to-element/index.d.ts +0 -1
  114. package/agnostic/html/selector-to-element/index.js +0 -9
  115. package/agnostic/html/string-to-nodes/index.d.ts +0 -7
  116. package/agnostic/html/string-to-nodes/index.js +0 -10
  117. package/agnostic/misc/assert/index.d.ts +0 -5
  118. package/agnostic/misc/assert/index.js +0 -6
  119. package/agnostic/misc/cast/index.d.ts +0 -9
  120. package/agnostic/misc/cast/index.js +0 -8
  121. package/agnostic/misc/crossenv/index.d.ts +0 -13
  122. package/agnostic/misc/crossenv/index.js +0 -6
  123. package/agnostic/misc/elo/index.d.ts +0 -31
  124. package/agnostic/misc/elo/index.js +0 -6
  125. package/agnostic/misc/get-current-downlink/index.d.ts +0 -1
  126. package/agnostic/misc/get-current-downlink/index.js +0 -6
  127. package/agnostic/misc/index.d.ts +0 -6
  128. package/agnostic/misc/index.js +0 -16
  129. package/agnostic/misc/is-constructor-function/index.d.ts +0 -2
  130. package/agnostic/misc/is-constructor-function/index.js +0 -6
  131. package/agnostic/misc/is-nullish/index.d.ts +0 -4
  132. package/agnostic/misc/is-nullish/index.js +0 -10
  133. package/agnostic/misc/logs/index.d.ts +0 -55
  134. package/agnostic/misc/logs/index.js +0 -6
  135. package/agnostic/misc/random/index.d.ts +0 -10
  136. package/agnostic/misc/random/index.js +0 -6
  137. package/agnostic/misc/tennis/index.d.ts +0 -60
  138. package/agnostic/misc/tennis/index.js +0 -6
  139. package/agnostic/numbers/absolute-modulo/index.d.ts +0 -1
  140. package/agnostic/numbers/absolute-modulo/index.js +0 -6
  141. package/agnostic/numbers/clamp/index.d.ts +0 -1
  142. package/agnostic/numbers/clamp/index.js +0 -6
  143. package/agnostic/numbers/index.d.ts +0 -13
  144. package/agnostic/numbers/index.js +0 -30
  145. package/agnostic/numbers/interpolate/index.d.ts +0 -1
  146. package/agnostic/numbers/interpolate/index.js +0 -6
  147. package/agnostic/numbers/responsive-harmonics/index.d.ts +0 -10
  148. package/agnostic/numbers/responsive-harmonics/index.js +0 -9
  149. package/agnostic/numbers/round/index.d.ts +0 -1
  150. package/agnostic/numbers/round/index.js +0 -6
  151. package/agnostic/objects/enums/index.d.ts +0 -4
  152. package/agnostic/objects/enums/index.js +0 -7
  153. package/agnostic/objects/enums/is-in-enum/index.d.ts +0 -1
  154. package/agnostic/objects/enums/is-in-enum/index.js +0 -6
  155. package/agnostic/objects/flatten-getters/index.d.ts +0 -1
  156. package/agnostic/objects/flatten-getters/index.js +0 -9
  157. package/agnostic/objects/index.d.ts +0 -12
  158. package/agnostic/objects/index.js +0 -32
  159. package/agnostic/objects/is-object/index.d.ts +0 -1
  160. package/agnostic/objects/is-object/index.js +0 -6
  161. package/agnostic/objects/is-record/index.d.ts +0 -1
  162. package/agnostic/objects/is-record/index.js +0 -6
  163. package/agnostic/objects/record-format/index.d.ts +0 -11
  164. package/agnostic/objects/record-format/index.js +0 -16
  165. package/agnostic/objects/validation/index.d.ts +0 -3
  166. package/agnostic/objects/validation/index.js +0 -6
  167. package/agnostic/optim/index.d.ts +0 -7
  168. package/agnostic/optim/index.js +0 -18
  169. package/agnostic/optim/memoize/index.d.ts +0 -3
  170. package/agnostic/optim/memoize/index.js +0 -6
  171. package/agnostic/optim/throttle-debounce/index.d.ts +0 -30
  172. package/agnostic/optim/throttle-debounce/index.js +0 -8
  173. package/agnostic/optim/throttle-debounce/types.d.ts +0 -2
  174. package/agnostic/regexps/index.d.ts +0 -23
  175. package/agnostic/regexps/index.js +0 -89
  176. package/agnostic/strings/char-codes/index.d.ts +0 -17
  177. package/agnostic/strings/char-codes/index.js +0 -6
  178. package/agnostic/strings/index.d.ts +0 -14
  179. package/agnostic/strings/index.js +0 -32
  180. package/agnostic/strings/matches/index.d.ts +0 -3
  181. package/agnostic/strings/matches/index.js +0 -10
  182. package/agnostic/strings/normalize-indent/index.d.ts +0 -1
  183. package/agnostic/strings/normalize-indent/index.js +0 -6
  184. package/agnostic/strings/replace-all/index.d.ts +0 -1
  185. package/agnostic/strings/replace-all/index.js +0 -6
  186. package/agnostic/strings/to-alphanum/index.d.ts +0 -1
  187. package/agnostic/strings/to-alphanum/index.js +0 -6
  188. package/chunks/chunk-32IRF4OP.js +0 -9
  189. package/chunks/chunk-34U4HX4V.js +0 -73
  190. package/chunks/chunk-4GDNHUCZ.js +0 -162
  191. package/chunks/chunk-4QQBKBYH.js +0 -59
  192. package/chunks/chunk-4VC5PT5T.js +0 -13
  193. package/chunks/chunk-5LNUCDQ6.js +0 -132
  194. package/chunks/chunk-7AWTHZLY.js +0 -12
  195. package/chunks/chunk-7DBNMU6N.js +0 -14
  196. package/chunks/chunk-COVPTTAD.js +0 -10
  197. package/chunks/chunk-DNIOWD7K.js +0 -8
  198. package/chunks/chunk-DQNJQBC6.js +0 -10
  199. package/chunks/chunk-E6MSDKON.js +0 -13
  200. package/chunks/chunk-EDVNAV3G.js +0 -72
  201. package/chunks/chunk-EW46EXFB.js +0 -8
  202. package/chunks/chunk-FPEW3A27.js +0 -14
  203. package/chunks/chunk-GJOU3UAL.js +0 -36
  204. package/chunks/chunk-HC6ZOHCS.js +0 -14
  205. package/chunks/chunk-HGCG2J77.js +0 -122
  206. package/chunks/chunk-IFD7GSGK.js +0 -130
  207. package/chunks/chunk-JQXNEJAP.js +0 -18
  208. package/chunks/chunk-JWBDZPQG.js +0 -18
  209. package/chunks/chunk-K37RALUX.js +0 -8
  210. package/chunks/chunk-KIONYWA7.js +0 -168
  211. package/chunks/chunk-KQT5CTGF.js +0 -21
  212. package/chunks/chunk-LEXQ6E6L.js +0 -31
  213. package/chunks/chunk-LQFKUNVQ.js +0 -19
  214. package/chunks/chunk-MF56TTC5.js +0 -15
  215. package/chunks/chunk-MT74WIQR.js +0 -41
  216. package/chunks/chunk-NRITRUZW.js +0 -10
  217. package/chunks/chunk-NRJQKVQV.js +0 -31
  218. package/chunks/chunk-OSAXBA7G.js +0 -10
  219. package/chunks/chunk-PO3V3I57.js +0 -23
  220. package/chunks/chunk-QXAJXTXV.js +0 -19
  221. package/chunks/chunk-RCO57B6F.js +0 -9
  222. package/chunks/chunk-SQZGZ3VT.js +0 -15
  223. package/chunks/chunk-TTZHPIH7.js +0 -237
  224. package/chunks/chunk-UYTXXUU7.js +0 -54
  225. package/chunks/chunk-VTPRO4NJ.js +0 -10
  226. package/chunks/chunk-VYW4IADX.js +0 -35
  227. package/chunks/chunk-VZDUZTW6.js +0 -113
  228. package/chunks/chunk-W5A2TON3.js +0 -10
  229. package/chunks/chunk-W7YBGJ4H.js +0 -28
  230. package/chunks/chunk-WLL3FNVL.js +0 -40
  231. package/chunks/chunk-WOAYU6LB.js +0 -13
  232. package/chunks/chunk-XA4HVHJ4.js +0 -18
  233. package/chunks/chunk-XN3PZIVL.js +0 -38
  234. package/chunks/chunk-Y3OZHZUF.js +0 -237
  235. package/chunks/chunk-YDIBNEGA.js +0 -9
  236. package/chunks/chunk-ZC5RZBNY.js +0 -33
  237. package/components/Comp/index.d.ts +0 -1
  238. package/node/files/index.d.ts +0 -9
  239. package/node/files/index.js +0 -21
  240. package/node/files/is-in-directory/index.d.ts +0 -1
  241. package/node/files/is-in-directory/index.js +0 -6
  242. package/node/files/read-write/index.d.ts +0 -9
  243. package/node/files/read-write/index.js +0 -6
  244. package/node/files/subpaths/index.d.ts +0 -34
  245. package/node/files/subpaths/index.js +0 -7
  246. package/node/image/index.d.ts +0 -9
  247. package/node/image/index.js +0 -74
  248. package/node/mxfb-cli-config/index.d.ts +0 -19
  249. package/node/mxfb-cli-config/index.js +0 -113
  250. package/node/process/index.d.ts +0 -8
  251. package/node/process/index.js +0 -20
  252. package/node/process/on-exit/index.d.ts +0 -5
  253. package/node/process/on-exit/index.js +0 -14
  254. package/shared/errors/index.d.ts +0 -138
  255. package/shared/index.d.ts +0 -0
@@ -1,113 +0,0 @@
1
- // src/node/mxfb-cli-config/index.ts
2
- import os from "node:os";
3
- import { promises as fs } from "node:fs";
4
- import path from "node:path";
5
- var homeDirPath = os.homedir();
6
- var mxfbConfigDirPath = path.join(homeDirPath, ".config/mxfb-cli");
7
- var mxfbConfigFilePath = path.join(mxfbConfigDirPath, "config.json");
8
- var emptyConfigObj = {};
9
- async function createConfigFile(force = false) {
10
- await fs.mkdir(mxfbConfigDirPath, { recursive: true });
11
- try {
12
- await fs.stat(mxfbConfigFilePath);
13
- if (force === true) throw "create anyway";
14
- return true;
15
- } catch (err) {
16
- try {
17
- await fs.writeFile(
18
- mxfbConfigFilePath,
19
- `${JSON.stringify(emptyConfigObj, null, 2)}
20
- `,
21
- { encoding: "utf-8" }
22
- );
23
- return true;
24
- } catch (err2) {
25
- if (err2 instanceof Error) return err2;
26
- if (typeof err2 === "string") return new Error(err2);
27
- return new Error(`${err2}`);
28
- }
29
- }
30
- }
31
- var deletionSecurityPhrase = "THIS IS A DESTRUCTIVE AND DEFINITIVE ACTION";
32
- async function deleteConfigDir(security) {
33
- if (security !== deletionSecurityPhrase) return new Error("You must provide the security phrase");
34
- await fs.rm(mxfbConfigDirPath, { recursive: true, force: true });
35
- return true;
36
- }
37
- async function deleteConfigFile(security) {
38
- if (security !== deletionSecurityPhrase) return new Error("You must provide the security phrase");
39
- await fs.rm(mxfbConfigDirPath);
40
- return true;
41
- }
42
- async function ensureConfigFile() {
43
- try {
44
- await fs.stat(mxfbConfigFilePath);
45
- return true;
46
- } catch (err) {
47
- try {
48
- const created = await createConfigFile();
49
- if (created instanceof Error) throw created;
50
- return true;
51
- } catch (err2) {
52
- if (err2 instanceof Error) return err2;
53
- if (typeof err2 === "string") return new Error(err2);
54
- return new Error(`${err2}`);
55
- }
56
- }
57
- }
58
- async function getConfigFile() {
59
- try {
60
- const fileContents = await fs.readFile(mxfbConfigFilePath, { encoding: "utf-8" });
61
- return fileContents;
62
- } catch (err) {
63
- if (err instanceof Error) return err;
64
- if (typeof err === "string") return new Error(err);
65
- return new Error(`${err}`);
66
- }
67
- }
68
- function validateConfigObj(configObj) {
69
- return true;
70
- }
71
- function parseConfigFile(fileContents) {
72
- try {
73
- const parsed = JSON.parse(fileContents);
74
- const validated = validateConfigObj(parsed);
75
- if (!validated) throw new Error(`Invalid config file shape: ${fileContents}`);
76
- return parsed;
77
- } catch (err) {
78
- if (err instanceof Error) return err;
79
- if (typeof err === "string") return new Error(err);
80
- return new Error(`${err}`);
81
- }
82
- }
83
- async function getConfig(create = false) {
84
- if (create) {
85
- const created = await ensureConfigFile();
86
- if (created !== true) return created;
87
- }
88
- const configStr = await getConfigFile();
89
- if (configStr instanceof Error) return configStr;
90
- const parsed = parseConfigFile(configStr);
91
- if (parsed instanceof Error) return parsed;
92
- return parsed;
93
- }
94
- async function updateConfig(updater, create = false) {
95
- const currentConfig = await getConfig(create);
96
- if (currentConfig instanceof Error) return currentConfig;
97
- const updatedConfig = typeof updater === "function" ? updater(currentConfig) : { ...currentConfig, ...updater };
98
- const stringified = JSON.stringify(updatedConfig, null, 2);
99
- await fs.writeFile(mxfbConfigFilePath, stringified, { encoding: "utf-8" });
100
- return true;
101
- }
102
- export {
103
- createConfigFile,
104
- deleteConfigDir,
105
- deleteConfigFile,
106
- emptyConfigObj,
107
- ensureConfigFile,
108
- getConfig,
109
- getConfigFile,
110
- parseConfigFile,
111
- updateConfig,
112
- validateConfigObj
113
- };
@@ -1,8 +0,0 @@
1
- import { beforeForcedExit as beforeForcedExitFunc, beforeExit as beforeExitFunc, onExit as onExitFunc, onAllExits as onAllExitsFunc } from './on-exit';
2
- export declare namespace Process {
3
- const forceExitEvents: string[];
4
- const beforeForcedExit: typeof beforeForcedExitFunc;
5
- const beforeExit: typeof beforeExitFunc;
6
- const onExit: typeof onExitFunc;
7
- const onAllExits: typeof onAllExitsFunc;
8
- }
@@ -1,20 +0,0 @@
1
- import {
2
- beforeExit,
3
- beforeForcedExit,
4
- forceExitEvents,
5
- onAllExits,
6
- onExit
7
- } from "../../chunks/chunk-LEXQ6E6L.js";
8
-
9
- // src/node/process/index.ts
10
- var Process;
11
- ((Process2) => {
12
- Process2.forceExitEvents = forceExitEvents;
13
- Process2.beforeForcedExit = beforeForcedExit;
14
- Process2.beforeExit = beforeExit;
15
- Process2.onExit = onExit;
16
- Process2.onAllExits = onAllExits;
17
- })(Process || (Process = {}));
18
- export {
19
- Process
20
- };
@@ -1,5 +0,0 @@
1
- export declare const forceExitEvents: string[];
2
- export declare function beforeForcedExit(callback: () => void | Promise<void>): void;
3
- export declare function beforeExit(callback: () => void | Promise<void>): void;
4
- export declare function onExit(callback: () => void | Promise<void>): void;
5
- export declare function onAllExits(callback: () => void | Promise<void>): void;
@@ -1,14 +0,0 @@
1
- import {
2
- beforeExit,
3
- beforeForcedExit,
4
- forceExitEvents,
5
- onAllExits,
6
- onExit
7
- } from "../../../chunks/chunk-LEXQ6E6L.js";
8
- export {
9
- beforeExit,
10
- beforeForcedExit,
11
- forceExitEvents,
12
- onAllExits,
13
- onExit
14
- };
@@ -1,138 +0,0 @@
1
- import { Errors } from '@design-edito/tools/agnostic/errors';
2
- export declare enum Codes {
3
- NO_DOCUMENT = "no-window-document-on-runtime",
4
- NO_DOCUMENT_PLEASE_PROVIDE = "no-window-document-on-runtime-please-provide",
5
- IMPOSSIBLE_TO_PICK_IN_ARRAY = "impossible-to-pick-in-array"
6
- }
7
- export declare const register: {
8
- getMessage: <Code extends Codes>(code: Code) => Errors.Register.Message<{
9
- "no-window-document-on-runtime": {
10
- message: string;
11
- detailsMaker: () => undefined;
12
- };
13
- "no-window-document-on-runtime-please-provide": {
14
- message: string;
15
- detailsMaker: (tips?: string) => string | undefined;
16
- };
17
- "impossible-to-pick-in-array": {
18
- message: string;
19
- detailsMaker: (array: any[]) => "Array cannot be empty" | "Too many exclusions";
20
- };
21
- }, Code>;
22
- getDetailsMaker: <Code extends Codes>(code: Code) => Errors.Register.DetailsMaker<{
23
- "no-window-document-on-runtime": {
24
- message: string;
25
- detailsMaker: () => undefined;
26
- };
27
- "no-window-document-on-runtime-please-provide": {
28
- message: string;
29
- detailsMaker: (tips?: string) => string | undefined;
30
- };
31
- "impossible-to-pick-in-array": {
32
- message: string;
33
- detailsMaker: (array: any[]) => "Array cannot be empty" | "Too many exclusions";
34
- };
35
- }, Code>;
36
- getDetails: <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
37
- "no-window-document-on-runtime": {
38
- message: string;
39
- detailsMaker: () => undefined;
40
- };
41
- "no-window-document-on-runtime-please-provide": {
42
- message: string;
43
- detailsMaker: (tips?: string) => string | undefined;
44
- };
45
- "impossible-to-pick-in-array": {
46
- message: string;
47
- detailsMaker: (array: any[]) => "Array cannot be empty" | "Too many exclusions";
48
- };
49
- }, Code>>) => ReturnType<Errors.Register.DetailsMaker<{
50
- "no-window-document-on-runtime": {
51
- message: string;
52
- detailsMaker: () => undefined;
53
- };
54
- "no-window-document-on-runtime-please-provide": {
55
- message: string;
56
- detailsMaker: (tips?: string) => string | undefined;
57
- };
58
- "impossible-to-pick-in-array": {
59
- message: string;
60
- detailsMaker: (array: any[]) => "Array cannot be empty" | "Too many exclusions";
61
- };
62
- }, Code>>;
63
- getErrorData: <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
64
- "no-window-document-on-runtime": {
65
- message: string;
66
- detailsMaker: () => undefined;
67
- };
68
- "no-window-document-on-runtime-please-provide": {
69
- message: string;
70
- detailsMaker: (tips?: string) => string | undefined;
71
- };
72
- "impossible-to-pick-in-array": {
73
- message: string;
74
- detailsMaker: (array: any[]) => "Array cannot be empty" | "Too many exclusions";
75
- };
76
- }, Code>>) => Errors.Register.ErrorData<{
77
- "no-window-document-on-runtime": {
78
- message: string;
79
- detailsMaker: () => undefined;
80
- };
81
- "no-window-document-on-runtime-please-provide": {
82
- message: string;
83
- detailsMaker: (tips?: string) => string | undefined;
84
- };
85
- "impossible-to-pick-in-array": {
86
- message: string;
87
- detailsMaker: (array: any[]) => "Array cannot be empty" | "Too many exclusions";
88
- };
89
- }, Code>;
90
- getError: <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
91
- "no-window-document-on-runtime": {
92
- message: string;
93
- detailsMaker: () => undefined;
94
- };
95
- "no-window-document-on-runtime-please-provide": {
96
- message: string;
97
- detailsMaker: (tips?: string) => string | undefined;
98
- };
99
- "impossible-to-pick-in-array": {
100
- message: string;
101
- detailsMaker: (array: any[]) => "Array cannot be empty" | "Too many exclusions";
102
- };
103
- }, Code>>) => {
104
- code: Code;
105
- details: ReturnType<Errors.Register.DetailsMaker<{
106
- "no-window-document-on-runtime": {
107
- message: string;
108
- detailsMaker: () => undefined;
109
- };
110
- "no-window-document-on-runtime-please-provide": {
111
- message: string;
112
- detailsMaker: (tips?: string) => string | undefined;
113
- };
114
- "impossible-to-pick-in-array": {
115
- message: string;
116
- detailsMaker: (array: any[]) => "Array cannot be empty" | "Too many exclusions";
117
- };
118
- }, Code>>;
119
- name: string;
120
- message: string;
121
- stack?: string;
122
- cause?: unknown;
123
- };
124
- source: {
125
- "no-window-document-on-runtime": {
126
- message: string;
127
- detailsMaker: () => undefined;
128
- };
129
- "no-window-document-on-runtime-please-provide": {
130
- message: string;
131
- detailsMaker: (tips?: string) => string | undefined;
132
- };
133
- "impossible-to-pick-in-array": {
134
- message: string;
135
- detailsMaker: (array: any[]) => "Array cannot be empty" | "Too many exclusions";
136
- };
137
- };
138
- };
package/shared/index.d.ts DELETED
File without changes