@etsoo/shared 1.2.52 → 1.2.54
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.
- package/.github/workflows/main.yml +6 -5
- package/lib/cjs/ActionResult.d.ts +1 -1
- package/lib/cjs/ActionResult.js +3 -3
- package/lib/cjs/ArrayUtils.d.ts +1 -1
- package/lib/cjs/ArrayUtils.js +4 -4
- package/lib/cjs/ColorUtils.d.ts +1 -1
- package/lib/cjs/ColorUtils.js +2 -2
- package/lib/cjs/DataTypes.d.ts +6 -6
- package/lib/cjs/DataTypes.js +50 -51
- package/lib/cjs/DateUtils.d.ts +1 -1
- package/lib/cjs/DateUtils.js +27 -28
- package/lib/cjs/DomUtils.d.ts +3 -3
- package/lib/cjs/DomUtils.js +64 -73
- package/lib/cjs/ExtendUtils.d.ts +1 -1
- package/lib/cjs/ExtendUtils.js +6 -6
- package/lib/cjs/IActionResult.d.ts +1 -1
- package/lib/cjs/NumberUtils.d.ts +1 -1
- package/lib/cjs/NumberUtils.js +9 -9
- package/lib/cjs/StorageUtils.js +2 -2
- package/lib/cjs/Utils.d.ts +4 -4
- package/lib/cjs/Utils.js +58 -62
- package/lib/cjs/index.d.ts +22 -22
- package/lib/cjs/storage/WindowStorage.d.ts +1 -1
- package/lib/cjs/types/ContentDisposition.d.ts +2 -2
- package/lib/cjs/types/ContentDisposition.js +11 -13
- package/lib/cjs/types/EColor.js +5 -7
- package/lib/cjs/types/EHistory.d.ts +3 -3
- package/lib/cjs/types/EHistory.js +4 -4
- package/lib/cjs/types/ErrorData.d.ts +1 -1
- package/lib/cjs/types/EventClass.js +1 -1
- package/lib/mjs/ActionResult.d.ts +1 -1
- package/lib/mjs/ActionResult.js +3 -3
- package/lib/mjs/ArrayUtils.d.ts +1 -1
- package/lib/mjs/ArrayUtils.js +5 -5
- package/lib/mjs/ColorUtils.d.ts +1 -1
- package/lib/mjs/ColorUtils.js +3 -3
- package/lib/mjs/DataTypes.d.ts +6 -6
- package/lib/mjs/DataTypes.js +50 -51
- package/lib/mjs/DateUtils.d.ts +1 -1
- package/lib/mjs/DateUtils.js +27 -28
- package/lib/mjs/DomUtils.d.ts +3 -3
- package/lib/mjs/DomUtils.js +67 -76
- package/lib/mjs/ExtendUtils.d.ts +1 -1
- package/lib/mjs/ExtendUtils.js +6 -6
- package/lib/mjs/IActionResult.d.ts +1 -1
- package/lib/mjs/NumberUtils.d.ts +1 -1
- package/lib/mjs/NumberUtils.js +9 -9
- package/lib/mjs/StorageUtils.js +4 -4
- package/lib/mjs/Utils.d.ts +4 -4
- package/lib/mjs/Utils.js +61 -65
- package/lib/mjs/index.d.ts +22 -22
- package/lib/mjs/index.js +22 -22
- package/lib/mjs/storage/WindowStorage.d.ts +1 -1
- package/lib/mjs/storage/WindowStorage.js +2 -2
- package/lib/mjs/types/ContentDisposition.d.ts +2 -2
- package/lib/mjs/types/ContentDisposition.js +12 -14
- package/lib/mjs/types/EColor.js +5 -7
- package/lib/mjs/types/EHistory.d.ts +3 -3
- package/lib/mjs/types/EHistory.js +5 -5
- package/lib/mjs/types/ErrorData.d.ts +1 -1
- package/lib/mjs/types/EventClass.js +1 -1
- package/package.json +61 -63
- package/src/ActionResult.ts +23 -23
- package/src/ArrayUtils.ts +164 -172
- package/src/ColorUtils.ts +80 -82
- package/src/DataTypes.ts +745 -754
- package/src/DateUtils.ts +266 -268
- package/src/DomUtils.ts +806 -831
- package/src/ExtendUtils.ts +191 -191
- package/src/IActionResult.ts +42 -42
- package/src/Keyboard.ts +258 -258
- package/src/NumberUtils.ts +135 -135
- package/src/StorageUtils.ts +117 -117
- package/src/Utils.ts +908 -930
- package/src/index.ts +22 -22
- package/src/node/Storage.ts +53 -53
- package/src/storage/IStorage.ts +62 -62
- package/src/storage/WindowStorage.ts +140 -140
- package/src/types/ContentDisposition.ts +59 -63
- package/src/types/DataError.ts +15 -15
- package/src/types/DelayedExecutorType.ts +15 -15
- package/src/types/EColor.ts +241 -248
- package/src/types/EHistory.ts +151 -151
- package/src/types/ErrorData.ts +11 -11
- package/src/types/EventClass.ts +220 -220
- package/src/types/FormData.ts +25 -25
- package/src/types/ParsedPath.ts +5 -5
- package/tsconfig.cjs.json +16 -16
- package/tsconfig.json +16 -16
- package/.eslintignore +0 -3
- package/.eslintrc.json +0 -29
- package/.prettierignore +0 -5
- package/.prettierrc +0 -6
package/src/types/EventClass.ts
CHANGED
|
@@ -4,55 +4,55 @@
|
|
|
4
4
|
* D for data
|
|
5
5
|
*/
|
|
6
6
|
export abstract class EventBase<T, D> {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
7
|
+
private _propagationStopped: boolean = false;
|
|
8
|
+
/**
|
|
9
|
+
* stopImmediatePropagation called
|
|
10
|
+
*/
|
|
11
|
+
get propagationStopped() {
|
|
12
|
+
return this._propagationStopped;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
private _timeStamp: number;
|
|
16
|
+
/**
|
|
17
|
+
* Time stamp
|
|
18
|
+
*/
|
|
19
|
+
get timeStamp() {
|
|
20
|
+
return this._timeStamp;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Constructor
|
|
25
|
+
* @param type Type
|
|
26
|
+
*/
|
|
27
|
+
constructor(
|
|
28
|
+
public readonly target: {},
|
|
29
|
+
public readonly type: T,
|
|
30
|
+
public readonly data: D
|
|
31
|
+
) {
|
|
32
|
+
this._timeStamp = Date.now();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Prevent all other listeners from being called
|
|
37
|
+
*/
|
|
38
|
+
stopImmediatePropagation() {
|
|
39
|
+
this._propagationStopped = true;
|
|
40
|
+
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Event options
|
|
45
45
|
*/
|
|
46
46
|
interface EventOptions {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
/**
|
|
48
|
+
* A boolean value indicating that events of this type will be dispatched first
|
|
49
|
+
*/
|
|
50
|
+
capture?: boolean;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A boolean value indicating that the listener should be invoked at most once after being added
|
|
54
|
+
*/
|
|
55
|
+
once?: boolean;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
type EventClassDef = { [key: string]: object };
|
|
@@ -63,196 +63,196 @@ type EventClassDef = { [key: string]: object };
|
|
|
63
63
|
* D for data
|
|
64
64
|
*/
|
|
65
65
|
export abstract class EventClass<D extends EventClassDef> {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return true;
|
|
66
|
+
// Listeners
|
|
67
|
+
private readonly listeners = new Map<
|
|
68
|
+
keyof D,
|
|
69
|
+
[(event: EventBase<keyof D, D[keyof D]>) => void, EventOptions?][]
|
|
70
|
+
>();
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Has specific type events
|
|
74
|
+
* @param type Type
|
|
75
|
+
*/
|
|
76
|
+
hasEvents<T extends keyof D>(type: T): boolean;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Has specific type and callback events
|
|
80
|
+
* @param type Type
|
|
81
|
+
* @param callback Callback
|
|
82
|
+
*/
|
|
83
|
+
hasEvents<T extends keyof D>(
|
|
84
|
+
type: T,
|
|
85
|
+
callback: (event: EventBase<T, D[T]>) => void
|
|
86
|
+
): boolean;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Has specific type and callback events
|
|
90
|
+
* @param type Type
|
|
91
|
+
* @param callback Callback
|
|
92
|
+
* @returns Result
|
|
93
|
+
*/
|
|
94
|
+
hasEvents<T extends keyof D>(
|
|
95
|
+
type: T,
|
|
96
|
+
callback?: (event: EventBase<T, D[T]>) => void
|
|
97
|
+
) {
|
|
98
|
+
const items = this.listeners.get(type);
|
|
99
|
+
if (items == null || items.length === 0) return false;
|
|
100
|
+
|
|
101
|
+
if (callback) {
|
|
102
|
+
return items.some((item) => item[0] == callback);
|
|
106
103
|
}
|
|
107
104
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
if (items == null) return;
|
|
140
|
-
|
|
141
|
-
for (let i = items.length - 1; i >= 0; i--) {
|
|
142
|
-
if (items[i][0] == callback) {
|
|
143
|
-
items.splice(i, 1);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Remove all specific type events
|
|
110
|
+
* @param type Type
|
|
111
|
+
*/
|
|
112
|
+
off<T extends keyof D>(type: T): void;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Remove specific type and callback event
|
|
116
|
+
* @param type Type
|
|
117
|
+
* @param callback Callback
|
|
118
|
+
*/
|
|
119
|
+
off<T extends keyof D>(
|
|
120
|
+
type: T,
|
|
121
|
+
callback: (event: EventBase<T, D[T]>) => void
|
|
122
|
+
): void;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Remove specific type and callback event
|
|
126
|
+
* @param type Type
|
|
127
|
+
* @param callback Callback
|
|
128
|
+
*/
|
|
129
|
+
off<T extends keyof D>(
|
|
130
|
+
type: T,
|
|
131
|
+
callback?: (event: EventBase<T, D[T]>) => void
|
|
132
|
+
) {
|
|
133
|
+
if (callback == null) {
|
|
134
|
+
this.listeners.delete(type);
|
|
135
|
+
return;
|
|
146
136
|
}
|
|
147
137
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
* @param collection Collection of events
|
|
151
|
-
*/
|
|
152
|
-
on(collection: {
|
|
153
|
-
[type in keyof D]: (event: EventBase<type, D[type]>) => void;
|
|
154
|
-
}): void;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Add event listener
|
|
158
|
-
* @param type Type
|
|
159
|
-
* @param callback Callback
|
|
160
|
-
* @param options Options
|
|
161
|
-
*/
|
|
162
|
-
on<T extends keyof D>(
|
|
163
|
-
type: T,
|
|
164
|
-
callback: (event: EventBase<T, D[T]>) => void,
|
|
165
|
-
options?: EventOptions
|
|
166
|
-
): void;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Add events
|
|
170
|
-
* @param type Type
|
|
171
|
-
* @param callback Callback
|
|
172
|
-
* @param options Options
|
|
173
|
-
*/
|
|
174
|
-
on<T extends keyof D>(
|
|
175
|
-
type:
|
|
176
|
-
| {
|
|
177
|
-
[type in keyof D]: (event: EventBase<type, D[type]>) => void;
|
|
178
|
-
}
|
|
179
|
-
| T,
|
|
180
|
-
callback?: (event: EventBase<T, D[T]>) => void,
|
|
181
|
-
options?: EventOptions
|
|
182
|
-
) {
|
|
183
|
-
if (typeof type === 'object') {
|
|
184
|
-
for (const key in type) {
|
|
185
|
-
const item = key as keyof D;
|
|
186
|
-
const itemCallback = type[item] ?? callback;
|
|
187
|
-
if (itemCallback) this.on(item, itemCallback, options);
|
|
188
|
-
}
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (callback == null) return;
|
|
193
|
-
this.listeners.has(type) || this.listeners.set(type, []);
|
|
138
|
+
const items = this.listeners.get(type);
|
|
139
|
+
if (items == null) return;
|
|
194
140
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
141
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
142
|
+
if (items[i][0] == callback) {
|
|
143
|
+
items.splice(i, 1);
|
|
144
|
+
}
|
|
198
145
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Add event listeners
|
|
150
|
+
* @param collection Collection of events
|
|
151
|
+
*/
|
|
152
|
+
on(collection: {
|
|
153
|
+
[type in keyof D]: (event: EventBase<type, D[type]>) => void;
|
|
154
|
+
}): void;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Add event listener
|
|
158
|
+
* @param type Type
|
|
159
|
+
* @param callback Callback
|
|
160
|
+
* @param options Options
|
|
161
|
+
*/
|
|
162
|
+
on<T extends keyof D>(
|
|
163
|
+
type: T,
|
|
164
|
+
callback: (event: EventBase<T, D[T]>) => void,
|
|
165
|
+
options?: EventOptions
|
|
166
|
+
): void;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Add events
|
|
170
|
+
* @param type Type
|
|
171
|
+
* @param callback Callback
|
|
172
|
+
* @param options Options
|
|
173
|
+
*/
|
|
174
|
+
on<T extends keyof D>(
|
|
175
|
+
type:
|
|
176
|
+
| {
|
|
177
|
+
[type in keyof D]: (event: EventBase<type, D[type]>) => void;
|
|
232
178
|
}
|
|
179
|
+
| T,
|
|
180
|
+
callback?: (event: EventBase<T, D[T]>) => void,
|
|
181
|
+
options?: EventOptions
|
|
182
|
+
) {
|
|
183
|
+
if (typeof type === "object") {
|
|
184
|
+
for (const key in type) {
|
|
185
|
+
const item = key as keyof D;
|
|
186
|
+
const itemCallback = type[item] ?? callback;
|
|
187
|
+
if (itemCallback) this.on(item, itemCallback, options);
|
|
188
|
+
}
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
233
191
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
192
|
+
if (callback == null) return;
|
|
193
|
+
this.listeners.has(type) || this.listeners.set(type, []);
|
|
194
|
+
|
|
195
|
+
// String to T conversion problem
|
|
196
|
+
// "keyofStringsOnly": true could solve part of it
|
|
197
|
+
this.listeners.get(type)?.push([callback as any, options]);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Trigger event
|
|
202
|
+
* @param event Event
|
|
203
|
+
*/
|
|
204
|
+
trigger<T extends keyof D>(event: EventBase<T, D[T]>) {
|
|
205
|
+
const items = this.listeners.get(event.type);
|
|
206
|
+
if (items == null) return;
|
|
207
|
+
|
|
208
|
+
// Len
|
|
209
|
+
const len = items.length;
|
|
210
|
+
if (len === 0) return;
|
|
211
|
+
|
|
212
|
+
// Need to be removed indicies
|
|
213
|
+
const indicies: number[] = [];
|
|
214
|
+
|
|
215
|
+
// Capture items first
|
|
216
|
+
let stopped: boolean = false;
|
|
217
|
+
for (let c = 0; c < len; c++) {
|
|
218
|
+
const item = items[c];
|
|
219
|
+
const [callback, options] = item;
|
|
220
|
+
if (options == null || !options.capture) continue;
|
|
221
|
+
|
|
222
|
+
callback(event);
|
|
223
|
+
|
|
224
|
+
if (options.once) {
|
|
225
|
+
indicies.push(c);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (event.propagationStopped) {
|
|
229
|
+
stopped = true;
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
239
233
|
|
|
240
|
-
|
|
234
|
+
if (!stopped) {
|
|
235
|
+
for (let c = 0; c < len; c++) {
|
|
236
|
+
const item = items[c];
|
|
237
|
+
const [callback, options] = item;
|
|
238
|
+
if (options?.capture) continue;
|
|
241
239
|
|
|
242
|
-
|
|
243
|
-
indicies.push(c);
|
|
244
|
-
}
|
|
240
|
+
callback(event);
|
|
245
241
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
break;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
242
|
+
if (options?.once) {
|
|
243
|
+
indicies.push(c);
|
|
251
244
|
}
|
|
252
245
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
246
|
+
if (event.propagationStopped) {
|
|
247
|
+
stopped = true;
|
|
248
|
+
break;
|
|
256
249
|
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Remove all once handlers
|
|
254
|
+
for (let i = indicies.length - 1; i >= 0; i--) {
|
|
255
|
+
items.splice(indicies[i], 1);
|
|
257
256
|
}
|
|
257
|
+
}
|
|
258
258
|
}
|
package/src/types/FormData.ts
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
* File like interface
|
|
3
3
|
*/
|
|
4
4
|
export interface IFile {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Name of the file
|
|
7
|
+
*/
|
|
8
|
+
readonly name: string;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Size of the file in bytes
|
|
12
|
+
*/
|
|
13
|
+
readonly size: number;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
/**
|
|
16
|
+
* MIME type
|
|
17
|
+
*/
|
|
18
|
+
readonly type: string;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Last modified time of the file, in millisecond since the UNIX epoch
|
|
22
|
+
*/
|
|
23
|
+
readonly lastModified: number;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -33,13 +33,13 @@ export type FormDataFieldValue = string | IFile;
|
|
|
33
33
|
* https://developer.mozilla.org/en-US/docs/Web/API/FormData
|
|
34
34
|
*/
|
|
35
35
|
export interface IFormData {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
append(name: string, value: unknown, filename?: string): void;
|
|
37
|
+
delete(name: string): void;
|
|
38
|
+
entries(): IterableIterator<[string, FormDataEntryValue]>;
|
|
39
|
+
set(name: string, value: unknown, filename?: string): void;
|
|
40
|
+
get(name: string): FormDataFieldValue | null;
|
|
41
|
+
getAll(name: string): FormDataFieldValue[];
|
|
42
|
+
has(name: string): boolean;
|
|
43
|
+
keys(): IterableIterator<string>;
|
|
44
|
+
values(): IterableIterator<FormDataEntryValue>;
|
|
45
45
|
}
|
package/src/types/ParsedPath.ts
CHANGED
package/tsconfig.cjs.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
+
"target": "ES2020",
|
|
5
|
+
"module": "NodeNext",
|
|
6
|
+
"moduleResolution": "NodeNext",
|
|
7
|
+
"isolatedModules": true,
|
|
8
|
+
"outDir": "./lib/cjs",
|
|
9
|
+
"noEmit": false,
|
|
10
|
+
"declaration": true,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"lib": ["dom", "dom.iterable", "ESNext"]
|
|
16
|
+
},
|
|
17
|
+
"include": ["src"]
|
|
18
18
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
+
"target": "ES2020",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "Node10",
|
|
7
|
+
"isolatedModules": true,
|
|
8
|
+
"outDir": "./lib/mjs",
|
|
9
|
+
"noEmit": false,
|
|
10
|
+
"declaration": true,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"lib": ["dom", "dom.iterable", "esnext"]
|
|
16
|
+
},
|
|
17
|
+
"include": ["src"]
|
|
18
18
|
}
|
package/.eslintignore
DELETED
package/.eslintrc.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"node": true,
|
|
5
|
-
"es6": true,
|
|
6
|
-
"jest": true
|
|
7
|
-
},
|
|
8
|
-
"extends": ["airbnb-base", "prettier"],
|
|
9
|
-
"parser": "@typescript-eslint/parser",
|
|
10
|
-
"parserOptions": {
|
|
11
|
-
"ecmaVersion": 6,
|
|
12
|
-
"sourceType": "module"
|
|
13
|
-
},
|
|
14
|
-
"plugins": ["@typescript-eslint"],
|
|
15
|
-
"rules": {
|
|
16
|
-
"class-methods-use-this": "off",
|
|
17
|
-
"import/extensions": ["error", "never"],
|
|
18
|
-
"import/prefer-default-export": "off",
|
|
19
|
-
"@typescript-eslint/no-unused-vars": ["error"]
|
|
20
|
-
},
|
|
21
|
-
"settings": {
|
|
22
|
-
"import/resolver": {
|
|
23
|
-
"node": {
|
|
24
|
-
"paths": ["src"],
|
|
25
|
-
"extensions": [".ts"]
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
package/.prettierignore
DELETED