@design-edito/tools 0.1.13 → 0.1.15

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.
@@ -1,15 +1,3 @@
1
- import {
2
- Random
3
- } from "../../chunks/chunk-WLL3FNVL.js";
4
- import {
5
- register
6
- } from "../../chunks/chunk-DRXZ4YUW.js";
7
- import {
8
- Crossenv
9
- } from "../../chunks/chunk-GJOU3UAL.js";
10
- import "../../chunks/chunk-4CMAH7Q4.js";
11
- import "../../chunks/chunk-HEXR23CH.js";
12
- import "../../chunks/chunk-HDPSQ7WY.js";
13
1
  import {
14
2
  generateNiceColor,
15
3
  niceColors
@@ -21,6 +9,18 @@ import {
21
9
  classNameRegex,
22
10
  isValidClassName
23
11
  } from "../../chunks/chunk-W5A2TON3.js";
12
+ import {
13
+ Random
14
+ } from "../../chunks/chunk-WLL3FNVL.js";
15
+ import {
16
+ register
17
+ } from "../../chunks/chunk-6Z7QI756.js";
18
+ import "../../chunks/chunk-4CMAH7Q4.js";
19
+ import "../../chunks/chunk-HEXR23CH.js";
20
+ import "../../chunks/chunk-HDPSQ7WY.js";
21
+ import {
22
+ Crossenv
23
+ } from "../../chunks/chunk-GJOU3UAL.js";
24
24
  import "../../chunks/chunk-QXAJXTXV.js";
25
25
  import "../../chunks/chunk-HC6ZOHCS.js";
26
26
 
@@ -1,27 +1,42 @@
1
- import { Outcome } from "~/agnostic/misc/outcome";
1
+ import { Outcome } from '~/agnostic/misc/outcome';
2
2
  export declare namespace Register {
3
3
  type RegisterEntry = {
4
4
  message: string;
5
- detailsMaker?: (...params: any[]) => any;
5
+ detailsMaker: (...params: any[]) => any;
6
6
  };
7
+ type RegisterKeys<Source extends {
8
+ [k: string]: RegisterEntry;
9
+ }> = keyof Source;
10
+ type Message<Source extends {
11
+ [k: string]: RegisterEntry;
12
+ }, Code extends RegisterKeys<Source>> = Source[Code]['message'];
13
+ type DetailsMaker<Source extends {
14
+ [k: string]: RegisterEntry;
15
+ }, Code extends RegisterKeys<Source>> = Source[Code]['detailsMaker'];
16
+ type DetailsMakerParams<Source extends {
17
+ [k: string]: RegisterEntry;
18
+ }, Code extends RegisterKeys<Source>> = Parameters<DetailsMaker<Source, Code>>;
19
+ type Details<Source extends {
20
+ [k: string]: RegisterEntry;
21
+ }, Code extends RegisterKeys<Source>> = ReturnType<DetailsMaker<Source, Code>>;
7
22
  function from<Source extends {
8
23
  [k: string]: RegisterEntry;
9
24
  }>(source: Source): {
10
- getMessage: <Code extends keyof Source>(code: Code) => Source[Code]["message"];
11
- getDetailsMaker: <Code extends keyof Source>(code: Code) => Source[Code]["detailsMaker"] extends (...params: any[]) => any ? Source[Code]["detailsMaker"] : undefined;
12
- getDetails: <Code extends keyof Source>(code: Code, ...params: (Source[Code]["detailsMaker"] extends (...params: any[]) => any ? Source[Code]["detailsMaker"] : undefined) extends (...params: infer P) => any ? P : []) => (Source[Code]["detailsMaker"] extends (...params: any[]) => any ? Source[Code]["detailsMaker"] : undefined) extends (...params: any[]) => infer R ? R : never;
13
- getError: <Code extends keyof Source>(code: Code, ...params: (Source[Code]["detailsMaker"] extends (...params: any[]) => any ? Source[Code]["detailsMaker"] : undefined) extends (...params: infer P) => any ? P : []) => {
25
+ getMessage: <Code extends RegisterKeys<Source>>(code: Code) => Message<Source, Code>;
26
+ getDetailsMaker: <Code extends RegisterKeys<Source>>(code: Code) => DetailsMaker<Source, Code>;
27
+ getDetails: <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>) => Details<Source, Code>;
28
+ getError: <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>) => {
14
29
  code: Code;
15
- details: (Source[Code]["detailsMaker"] extends (...params: any[]) => any ? Source[Code]["detailsMaker"] : undefined) extends (...params: any[]) => infer R ? R : never;
30
+ details: ReturnType<DetailsMaker<Source, Code>>;
16
31
  name: string;
17
32
  message: string;
18
33
  stack?: string;
19
34
  };
20
- getFailureOutcome: <Code extends keyof Source>(code: Code, ...params: (Source[Code]["detailsMaker"] extends (...params: any[]) => any ? Source[Code]["detailsMaker"] : undefined) extends (...params: infer P) => any ? P : []) => Outcome.Failure<Code, Source[Code]["message"], (Source[Code]["detailsMaker"] extends (...params: any[]) => any ? Source[Code]["detailsMaker"] : undefined) extends (...params: any[]) => infer R ? R : never>;
35
+ getFailureOutcome: <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>) => Outcome.Failure<Code, Message<Source, Code>, Details<Source, Code>>;
21
36
  CustomError: {
22
- new <Code extends keyof Source>(code: Code, ...params: (Source[Code]["detailsMaker"] extends (...params: any[]) => any ? Source[Code]["detailsMaker"] : undefined) extends (...params: infer P) => any ? P : []): {
37
+ new <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>): {
23
38
  code: Code;
24
- details: (Source[Code]["detailsMaker"] extends (...params: any[]) => any ? Source[Code]["detailsMaker"] : undefined) extends (...params: any[]) => infer R ? R : never;
39
+ details: Details<Source, Code>;
25
40
  name: string;
26
41
  message: string;
27
42
  stack?: string;
@@ -1,29 +1,29 @@
1
+ import {
2
+ getNodeAncestors
3
+ } from "../../chunks/chunk-SQZGZ3VT.js";
1
4
  import {
2
5
  insertNode
3
6
  } from "../../chunks/chunk-XA4HVHJ4.js";
7
+ import {
8
+ getPositionInsideParent
9
+ } from "../../chunks/chunk-VTPRO4NJ.js";
4
10
  import {
5
11
  Placeholders
6
12
  } from "../../chunks/chunk-VYW4IADX.js";
7
13
  import {
8
14
  selectorToElement
9
- } from "../../chunks/chunk-R6W6KA2P.js";
15
+ } from "../../chunks/chunk-65DWG6N7.js";
10
16
  import {
11
17
  stringToNodes
12
- } from "../../chunks/chunk-NGL6BHCM.js";
13
- import {
14
- getNodeAncestors
15
- } from "../../chunks/chunk-SQZGZ3VT.js";
16
- import {
17
- getPositionInsideParent
18
- } from "../../chunks/chunk-VTPRO4NJ.js";
18
+ } from "../../chunks/chunk-5HYQHLDT.js";
19
19
  import {
20
20
  Sanitize
21
- } from "../../chunks/chunk-4S4UJG5A.js";
22
- import "../../chunks/chunk-DRXZ4YUW.js";
23
- import "../../chunks/chunk-GJOU3UAL.js";
21
+ } from "../../chunks/chunk-WAWK26LM.js";
22
+ import "../../chunks/chunk-6Z7QI756.js";
24
23
  import "../../chunks/chunk-4CMAH7Q4.js";
25
24
  import "../../chunks/chunk-HEXR23CH.js";
26
25
  import "../../chunks/chunk-HDPSQ7WY.js";
26
+ import "../../chunks/chunk-GJOU3UAL.js";
27
27
 
28
28
  // src/agnostic/html/index.ts
29
29
  var Html;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  Sanitize
3
- } from "../../../chunks/chunk-4S4UJG5A.js";
4
- import "../../../chunks/chunk-DRXZ4YUW.js";
5
- import "../../../chunks/chunk-GJOU3UAL.js";
3
+ } from "../../../chunks/chunk-WAWK26LM.js";
4
+ import "../../../chunks/chunk-6Z7QI756.js";
6
5
  import "../../../chunks/chunk-4CMAH7Q4.js";
7
6
  import "../../../chunks/chunk-HEXR23CH.js";
8
7
  import "../../../chunks/chunk-HDPSQ7WY.js";
8
+ import "../../../chunks/chunk-GJOU3UAL.js";
9
9
  export {
10
10
  Sanitize
11
11
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  selectorToElement
3
- } from "../../../chunks/chunk-R6W6KA2P.js";
4
- import "../../../chunks/chunk-DRXZ4YUW.js";
5
- import "../../../chunks/chunk-GJOU3UAL.js";
3
+ } from "../../../chunks/chunk-65DWG6N7.js";
4
+ import "../../../chunks/chunk-6Z7QI756.js";
6
5
  import "../../../chunks/chunk-4CMAH7Q4.js";
7
6
  import "../../../chunks/chunk-HEXR23CH.js";
8
7
  import "../../../chunks/chunk-HDPSQ7WY.js";
8
+ import "../../../chunks/chunk-GJOU3UAL.js";
9
9
  export {
10
10
  selectorToElement
11
11
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  stringToNodes
3
- } from "../../../chunks/chunk-NGL6BHCM.js";
4
- import "../../../chunks/chunk-4S4UJG5A.js";
5
- import "../../../chunks/chunk-DRXZ4YUW.js";
6
- import "../../../chunks/chunk-GJOU3UAL.js";
3
+ } from "../../../chunks/chunk-5HYQHLDT.js";
4
+ import "../../../chunks/chunk-WAWK26LM.js";
5
+ import "../../../chunks/chunk-6Z7QI756.js";
7
6
  import "../../../chunks/chunk-4CMAH7Q4.js";
8
7
  import "../../../chunks/chunk-HEXR23CH.js";
9
8
  import "../../../chunks/chunk-HDPSQ7WY.js";
9
+ import "../../../chunks/chunk-GJOU3UAL.js";
10
10
  export {
11
11
  stringToNodes
12
12
  };
@@ -1,9 +1,6 @@
1
1
  import {
2
2
  getCurrentDownlink
3
3
  } from "../../chunks/chunk-7AWTHZLY.js";
4
- import {
5
- Logs
6
- } from "../../chunks/chunk-HEJV6JIO.js";
7
4
  import {
8
5
  Assert
9
6
  } from "../../chunks/chunk-W7YBGJ4H.js";
@@ -11,14 +8,17 @@ import {
11
8
  Cast
12
9
  } from "../../chunks/chunk-4QQBKBYH.js";
13
10
  import {
14
- isConstructorFunction
15
- } from "../../chunks/chunk-RCO57B6F.js";
11
+ Logs
12
+ } from "../../chunks/chunk-HEJV6JIO.js";
16
13
  import {
17
14
  Random
18
15
  } from "../../chunks/chunk-WLL3FNVL.js";
19
16
  import {
20
17
  Crossenv
21
18
  } from "../../chunks/chunk-GJOU3UAL.js";
19
+ import {
20
+ isConstructorFunction
21
+ } from "../../chunks/chunk-RCO57B6F.js";
22
22
  import "../../chunks/chunk-QXAJXTXV.js";
23
23
  import {
24
24
  isNotNullish,
@@ -1,3 +1,6 @@
1
+ import {
2
+ clamp
3
+ } from "../../chunks/chunk-OSAXBA7G.js";
1
4
  import {
2
5
  interpolate
3
6
  } from "../../chunks/chunk-EW46EXFB.js";
@@ -5,15 +8,12 @@ import {
5
8
  createScale,
6
9
  getHarmonic
7
10
  } from "../../chunks/chunk-UYTXXUU7.js";
8
- import {
9
- absoluteModulo
10
- } from "../../chunks/chunk-DNIOWD7K.js";
11
- import {
12
- clamp
13
- } from "../../chunks/chunk-OSAXBA7G.js";
14
11
  import {
15
12
  round
16
13
  } from "../../chunks/chunk-32IRF4OP.js";
14
+ import {
15
+ absoluteModulo
16
+ } from "../../chunks/chunk-DNIOWD7K.js";
17
17
 
18
18
  // src/agnostic/numbers/index.ts
19
19
  var Numbers;
@@ -5,12 +5,12 @@ import {
5
5
  isNonNullObject,
6
6
  isObject
7
7
  } from "../../chunks/chunk-HQLRJ7XW.js";
8
- import {
9
- Validation
10
- } from "../../chunks/chunk-FPEW3A27.js";
11
8
  import {
12
9
  isRecord
13
10
  } from "../../chunks/chunk-YDIBNEGA.js";
11
+ import {
12
+ Validation
13
+ } from "../../chunks/chunk-FPEW3A27.js";
14
14
  import {
15
15
  Enums
16
16
  } from "../../chunks/chunk-WOAYU6LB.js";
@@ -7,14 +7,14 @@ import {
7
7
  matchesSome
8
8
  } from "../../chunks/chunk-LQFKUNVQ.js";
9
9
  import {
10
- replaceAll
11
- } from "../../chunks/chunk-MF56TTC5.js";
10
+ toAlphanum
11
+ } from "../../chunks/chunk-COVPTTAD.js";
12
12
  import {
13
13
  normalizeIndent
14
14
  } from "../../chunks/chunk-JQXNEJAP.js";
15
15
  import {
16
- toAlphanum
17
- } from "../../chunks/chunk-COVPTTAD.js";
16
+ replaceAll
17
+ } from "../../chunks/chunk-MF56TTC5.js";
18
18
 
19
19
  // src/agnostic/strings/index.ts
20
20
  var Strings;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Sanitize
3
- } from "./chunk-4S4UJG5A.js";
3
+ } from "./chunk-WAWK26LM.js";
4
4
  import {
5
5
  register
6
- } from "./chunk-DRXZ4YUW.js";
6
+ } from "./chunk-6Z7QI756.js";
7
7
  import {
8
8
  Crossenv
9
9
  } from "./chunk-GJOU3UAL.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  register
3
- } from "./chunk-DRXZ4YUW.js";
3
+ } from "./chunk-6Z7QI756.js";
4
4
  import {
5
5
  Crossenv
6
6
  } from "./chunk-GJOU3UAL.js";
@@ -1,14 +1,15 @@
1
- import {
2
- Crossenv
3
- } from "./chunk-GJOU3UAL.js";
4
1
  import {
5
2
  Errors
6
3
  } from "./chunk-4CMAH7Q4.js";
4
+ import {
5
+ Crossenv
6
+ } from "./chunk-GJOU3UAL.js";
7
7
 
8
8
  // src/shared/errors/index.ts
9
9
  var register = Errors.Register.from({
10
10
  ["no-window-document-on-runtime" /* NO_DOCUMENT */]: {
11
- message: `Runtime '${Crossenv.detectRuntime()}' does not provide a Document object, cannot complete.`
11
+ message: `Runtime '${Crossenv.detectRuntime()}' does not provide a Document object, cannot complete.`,
12
+ detailsMaker: () => void 0
12
13
  },
13
14
  ["no-window-document-on-runtime-please-provide" /* NO_DOCUMENT_PLEASE_PROVIDE */]: {
14
15
  message: `Please provide a Document object since none are found on runtime '${Crossenv.detectRuntime()}'`,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  register
3
- } from "./chunk-DRXZ4YUW.js";
3
+ } from "./chunk-6Z7QI756.js";
4
4
  import {
5
5
  Crossenv
6
6
  } from "./chunk-GJOU3UAL.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
- readWrite
3
- } from "../../chunks/chunk-7DBNMU6N.js";
2
+ Subpaths
3
+ } from "../../chunks/chunk-HGCG2J77.js";
4
4
  import {
5
5
  isInDirectory
6
6
  } from "../../chunks/chunk-NRITRUZW.js";
7
7
  import {
8
- Subpaths
9
- } from "../../chunks/chunk-HGCG2J77.js";
8
+ readWrite
9
+ } from "../../chunks/chunk-7DBNMU6N.js";
10
10
  import "../../chunks/chunk-LQFKUNVQ.js";
11
11
 
12
12
  // src/node/files/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design-edito/tools",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "",
5
5
  "author": "Maxime Fabas",
6
6
  "license": "ISC",
@@ -1,183 +1,123 @@
1
+ import { Errors } from '~/agnostic/errors';
1
2
  export declare enum Codes {
2
3
  NO_DOCUMENT = "no-window-document-on-runtime",
3
4
  NO_DOCUMENT_PLEASE_PROVIDE = "no-window-document-on-runtime-please-provide"
4
5
  }
5
6
  export declare const register: {
6
- getMessage: <Code extends Codes>(code: Code) => {
7
+ getMessage: <Code extends Codes>(code: Code) => Errors.Register.Message<{
7
8
  "no-window-document-on-runtime": {
8
9
  message: string;
10
+ detailsMaker: () => undefined;
9
11
  };
10
12
  "no-window-document-on-runtime-please-provide": {
11
13
  message: string;
12
14
  detailsMaker: (tips?: string) => string | undefined;
13
15
  };
14
- }[Code]["message"];
15
- getDetailsMaker: <Code extends Codes>(code: Code) => {
16
+ }, Code>;
17
+ getDetailsMaker: <Code extends Codes>(code: Code) => Errors.Register.DetailsMaker<{
16
18
  "no-window-document-on-runtime": {
17
19
  message: string;
20
+ detailsMaker: () => undefined;
18
21
  };
19
22
  "no-window-document-on-runtime-please-provide": {
20
23
  message: string;
21
24
  detailsMaker: (tips?: string) => string | undefined;
22
25
  };
23
- }[Code]["detailsMaker"] extends (...params: any[]) => any ? {
26
+ }, Code>;
27
+ getDetails: <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
24
28
  "no-window-document-on-runtime": {
25
29
  message: string;
30
+ detailsMaker: () => undefined;
26
31
  };
27
32
  "no-window-document-on-runtime-please-provide": {
28
33
  message: string;
29
34
  detailsMaker: (tips?: string) => string | undefined;
30
35
  };
31
- }[Code]["detailsMaker"] : undefined;
32
- getDetails: <Code extends Codes>(code: Code, ...params: ({
36
+ }, Code>>) => ReturnType<Errors.Register.DetailsMaker<{
33
37
  "no-window-document-on-runtime": {
34
38
  message: string;
39
+ detailsMaker: () => undefined;
35
40
  };
36
41
  "no-window-document-on-runtime-please-provide": {
37
42
  message: string;
38
43
  detailsMaker: (tips?: string) => string | undefined;
39
44
  };
40
- }[Code]["detailsMaker"] extends (...params: any[]) => any ? {
45
+ }, Code>>;
46
+ getError: <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
41
47
  "no-window-document-on-runtime": {
42
48
  message: string;
49
+ detailsMaker: () => undefined;
43
50
  };
44
51
  "no-window-document-on-runtime-please-provide": {
45
52
  message: string;
46
53
  detailsMaker: (tips?: string) => string | undefined;
47
54
  };
48
- }[Code]["detailsMaker"] : undefined) extends (...params: infer P) => any ? P : []) => ({
49
- "no-window-document-on-runtime": {
50
- message: string;
51
- };
52
- "no-window-document-on-runtime-please-provide": {
53
- message: string;
54
- detailsMaker: (tips?: string) => string | undefined;
55
- };
56
- }[Code]["detailsMaker"] extends (...params: any[]) => any ? {
57
- "no-window-document-on-runtime": {
58
- message: string;
59
- };
60
- "no-window-document-on-runtime-please-provide": {
61
- message: string;
62
- detailsMaker: (tips?: string) => string | undefined;
63
- };
64
- }[Code]["detailsMaker"] : undefined) extends (...params: any[]) => infer R ? R : never;
65
- getError: <Code extends Codes>(code: Code, ...params: ({
66
- "no-window-document-on-runtime": {
67
- message: string;
68
- };
69
- "no-window-document-on-runtime-please-provide": {
70
- message: string;
71
- detailsMaker: (tips?: string) => string | undefined;
72
- };
73
- }[Code]["detailsMaker"] extends (...params: any[]) => any ? {
74
- "no-window-document-on-runtime": {
75
- message: string;
76
- };
77
- "no-window-document-on-runtime-please-provide": {
78
- message: string;
79
- detailsMaker: (tips?: string) => string | undefined;
80
- };
81
- }[Code]["detailsMaker"] : undefined) extends (...params: infer P) => any ? P : []) => {
55
+ }, Code>>) => {
82
56
  code: Code;
83
- details: ({
57
+ details: ReturnType<Errors.Register.DetailsMaker<{
84
58
  "no-window-document-on-runtime": {
85
59
  message: string;
60
+ detailsMaker: () => undefined;
86
61
  };
87
62
  "no-window-document-on-runtime-please-provide": {
88
63
  message: string;
89
64
  detailsMaker: (tips?: string) => string | undefined;
90
65
  };
91
- }[Code]["detailsMaker"] extends (...params: any[]) => any ? {
92
- "no-window-document-on-runtime": {
93
- message: string;
94
- };
95
- "no-window-document-on-runtime-please-provide": {
96
- message: string;
97
- detailsMaker: (tips?: string) => string | undefined;
98
- };
99
- }[Code]["detailsMaker"] : undefined) extends (...params: any[]) => infer R ? R : never;
66
+ }, Code>>;
100
67
  name: string;
101
68
  message: string;
102
69
  stack?: string;
103
70
  };
104
- getFailureOutcome: <Code extends Codes>(code: Code, ...params: ({
105
- "no-window-document-on-runtime": {
106
- message: string;
107
- };
108
- "no-window-document-on-runtime-please-provide": {
109
- message: string;
110
- detailsMaker: (tips?: string) => string | undefined;
111
- };
112
- }[Code]["detailsMaker"] extends (...params: any[]) => any ? {
71
+ getFailureOutcome: <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
113
72
  "no-window-document-on-runtime": {
114
73
  message: string;
74
+ detailsMaker: () => undefined;
115
75
  };
116
76
  "no-window-document-on-runtime-please-provide": {
117
77
  message: string;
118
78
  detailsMaker: (tips?: string) => string | undefined;
119
79
  };
120
- }[Code]["detailsMaker"] : undefined) extends (...params: infer P) => any ? P : []) => import("../../agnostic/misc/outcome").Outcome.Failure<Code, {
80
+ }, Code>>) => import("../../agnostic/misc/outcome").Outcome.Failure<Code, Errors.Register.Message<{
121
81
  "no-window-document-on-runtime": {
122
82
  message: string;
83
+ detailsMaker: () => undefined;
123
84
  };
124
85
  "no-window-document-on-runtime-please-provide": {
125
86
  message: string;
126
87
  detailsMaker: (tips?: string) => string | undefined;
127
88
  };
128
- }[Code]["message"], ({
89
+ }, Code>, ReturnType<Errors.Register.DetailsMaker<{
129
90
  "no-window-document-on-runtime": {
130
91
  message: string;
92
+ detailsMaker: () => undefined;
131
93
  };
132
94
  "no-window-document-on-runtime-please-provide": {
133
95
  message: string;
134
96
  detailsMaker: (tips?: string) => string | undefined;
135
97
  };
136
- }[Code]["detailsMaker"] extends (...params: any[]) => any ? {
137
- "no-window-document-on-runtime": {
138
- message: string;
139
- };
140
- "no-window-document-on-runtime-please-provide": {
141
- message: string;
142
- detailsMaker: (tips?: string) => string | undefined;
143
- };
144
- }[Code]["detailsMaker"] : undefined) extends (...params: any[]) => infer R ? R : never>;
98
+ }, Code>>>;
145
99
  CustomError: {
146
- new <Code extends Codes>(code: Code, ...params: ({
147
- "no-window-document-on-runtime": {
148
- message: string;
149
- };
150
- "no-window-document-on-runtime-please-provide": {
151
- message: string;
152
- detailsMaker: (tips?: string) => string | undefined;
153
- };
154
- }[Code]["detailsMaker"] extends (...params: any[]) => any ? {
100
+ new <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
155
101
  "no-window-document-on-runtime": {
156
102
  message: string;
103
+ detailsMaker: () => undefined;
157
104
  };
158
105
  "no-window-document-on-runtime-please-provide": {
159
106
  message: string;
160
107
  detailsMaker: (tips?: string) => string | undefined;
161
108
  };
162
- }[Code]["detailsMaker"] : undefined) extends (...params: infer P) => any ? P : []): {
109
+ }, Code>>): {
163
110
  code: Code;
164
- details: ({
165
- "no-window-document-on-runtime": {
166
- message: string;
167
- };
168
- "no-window-document-on-runtime-please-provide": {
169
- message: string;
170
- detailsMaker: (tips?: string) => string | undefined;
171
- };
172
- }[Code]["detailsMaker"] extends (...params: any[]) => any ? {
111
+ details: ReturnType<Errors.Register.DetailsMaker<{
173
112
  "no-window-document-on-runtime": {
174
113
  message: string;
114
+ detailsMaker: () => undefined;
175
115
  };
176
116
  "no-window-document-on-runtime-please-provide": {
177
117
  message: string;
178
118
  detailsMaker: (tips?: string) => string | undefined;
179
119
  };
180
- }[Code]["detailsMaker"] : undefined) extends (...params: any[]) => infer R ? R : never;
120
+ }, Code>>;
181
121
  name: string;
182
122
  message: string;
183
123
  stack?: string;
@@ -189,6 +129,7 @@ export declare const register: {
189
129
  source: {
190
130
  "no-window-document-on-runtime": {
191
131
  message: string;
132
+ detailsMaker: () => undefined;
192
133
  };
193
134
  "no-window-document-on-runtime-please-provide": {
194
135
  message: string;