max-priority-queue-typed 2.5.0 → 2.5.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.
- package/dist/cjs/index.cjs +398 -55
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs-legacy/index.cjs +397 -54
- package/dist/cjs-legacy/index.cjs.map +1 -1
- package/dist/esm/index.mjs +398 -56
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm-legacy/index.mjs +397 -55
- package/dist/esm-legacy/index.mjs.map +1 -1
- package/dist/types/common/error.d.ts +9 -0
- package/dist/types/common/index.d.ts +1 -1
- package/dist/types/data-structures/base/index.d.ts +1 -0
- package/dist/types/data-structures/base/iterable-entry-base.d.ts +8 -8
- package/dist/types/data-structures/base/linear-base.d.ts +3 -3
- package/dist/types/data-structures/binary-tree/avl-tree.d.ts +288 -0
- package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +336 -0
- package/dist/types/data-structures/binary-tree/binary-tree.d.ts +618 -18
- package/dist/types/data-structures/binary-tree/bst.d.ts +676 -1
- package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +456 -0
- package/dist/types/data-structures/binary-tree/segment-tree.d.ts +144 -1
- package/dist/types/data-structures/binary-tree/tree-map.d.ts +3307 -399
- package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +3285 -360
- package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +2674 -325
- package/dist/types/data-structures/binary-tree/tree-set.d.ts +3072 -287
- package/dist/types/data-structures/graph/abstract-graph.d.ts +4 -4
- package/dist/types/data-structures/graph/directed-graph.d.ts +240 -0
- package/dist/types/data-structures/graph/undirected-graph.d.ts +216 -0
- package/dist/types/data-structures/hash/hash-map.d.ts +274 -10
- package/dist/types/data-structures/heap/heap.d.ts +336 -0
- package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +411 -3
- package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +363 -3
- package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +434 -2
- package/dist/types/data-structures/matrix/matrix.d.ts +192 -0
- package/dist/types/data-structures/queue/deque.d.ts +364 -4
- package/dist/types/data-structures/queue/queue.d.ts +288 -0
- package/dist/types/data-structures/stack/stack.d.ts +240 -0
- package/dist/types/data-structures/trie/trie.d.ts +292 -4
- package/dist/types/interfaces/graph.d.ts +1 -1
- package/dist/types/types/common.d.ts +2 -2
- package/dist/types/types/data-structures/binary-tree/bst.d.ts +1 -0
- package/dist/types/types/data-structures/binary-tree/tree-map.d.ts +5 -0
- package/dist/types/types/data-structures/binary-tree/tree-multi-set.d.ts +4 -0
- package/dist/types/types/data-structures/binary-tree/tree-set.d.ts +4 -0
- package/dist/types/types/data-structures/heap/heap.d.ts +1 -0
- package/dist/types/types/data-structures/priority-queue/priority-queue.d.ts +1 -0
- package/dist/types/types/utils/validate-type.d.ts +4 -4
- package/dist/umd/max-priority-queue-typed.js +395 -53
- package/dist/umd/max-priority-queue-typed.js.map +1 -1
- package/dist/umd/max-priority-queue-typed.min.js +1 -1
- package/dist/umd/max-priority-queue-typed.min.js.map +1 -1
- package/package.json +2 -2
- package/src/common/error.ts +19 -1
- package/src/common/index.ts +1 -1
- package/src/data-structures/base/index.ts +1 -0
- package/src/data-structures/base/iterable-element-base.ts +3 -2
- package/src/data-structures/base/iterable-entry-base.ts +8 -8
- package/src/data-structures/base/linear-base.ts +3 -3
- package/src/data-structures/binary-tree/avl-tree.ts +299 -0
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +341 -5
- package/src/data-structures/binary-tree/binary-tree.ts +606 -6
- package/src/data-structures/binary-tree/bst.ts +946 -7
- package/src/data-structures/binary-tree/red-black-tree.ts +472 -0
- package/src/data-structures/binary-tree/segment-tree.ts +145 -2
- package/src/data-structures/binary-tree/tree-map.ts +3423 -499
- package/src/data-structures/binary-tree/tree-multi-map.ts +3537 -596
- package/src/data-structures/binary-tree/tree-multi-set.ts +2855 -495
- package/src/data-structures/binary-tree/tree-set.ts +3209 -413
- package/src/data-structures/graph/abstract-graph.ts +6 -6
- package/src/data-structures/graph/directed-graph.ts +240 -0
- package/src/data-structures/graph/undirected-graph.ts +216 -0
- package/src/data-structures/hash/hash-map.ts +281 -19
- package/src/data-structures/heap/heap.ts +340 -4
- package/src/data-structures/heap/max-heap.ts +2 -2
- package/src/data-structures/linked-list/doubly-linked-list.ts +411 -3
- package/src/data-structures/linked-list/singly-linked-list.ts +363 -3
- package/src/data-structures/linked-list/skip-linked-list.ts +439 -7
- package/src/data-structures/matrix/matrix.ts +202 -10
- package/src/data-structures/priority-queue/max-priority-queue.ts +2 -2
- package/src/data-structures/queue/deque.ts +365 -5
- package/src/data-structures/queue/queue.ts +288 -0
- package/src/data-structures/stack/stack.ts +240 -0
- package/src/data-structures/trie/trie.ts +295 -7
- package/src/interfaces/graph.ts +1 -1
- package/src/types/common.ts +2 -2
- package/src/types/data-structures/binary-tree/bst.ts +1 -0
- package/src/types/data-structures/binary-tree/tree-map.ts +6 -0
- package/src/types/data-structures/binary-tree/tree-multi-set.ts +5 -0
- package/src/types/data-structures/binary-tree/tree-set.ts +5 -0
- package/src/types/data-structures/heap/heap.ts +1 -0
- package/src/types/data-structures/priority-queue/priority-queue.ts +1 -0
- package/src/types/utils/validate-type.ts +4 -4
|
@@ -229,6 +229,30 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
229
229
|
|
|
230
230
|
|
|
231
231
|
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
232
256
|
* @example
|
|
233
257
|
* // basic Trie creation and add words
|
|
234
258
|
* // Create a simple Trie with initial words
|
|
@@ -259,6 +283,30 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
259
283
|
|
|
260
284
|
|
|
261
285
|
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
262
310
|
* @example
|
|
263
311
|
* // Add multiple words
|
|
264
312
|
* const trie = new Trie();
|
|
@@ -284,6 +332,30 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
284
332
|
|
|
285
333
|
|
|
286
334
|
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
287
359
|
* @example
|
|
288
360
|
* // Check if a word exists
|
|
289
361
|
* const dict = new Trie(['apple', 'app', 'application']);
|
|
@@ -305,6 +377,30 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
305
377
|
|
|
306
378
|
|
|
307
379
|
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
308
404
|
* @example
|
|
309
405
|
* // Check if empty
|
|
310
406
|
* const trie = new Trie();
|
|
@@ -325,6 +421,30 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
325
421
|
|
|
326
422
|
|
|
327
423
|
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
|
|
328
448
|
* @example
|
|
329
449
|
* // Remove all words
|
|
330
450
|
* const trie = new Trie(['a', 'b', 'c']);
|
|
@@ -348,6 +468,30 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
348
468
|
|
|
349
469
|
|
|
350
470
|
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
|
|
351
495
|
* @example
|
|
352
496
|
* // Trie delete and iteration
|
|
353
497
|
* const trie = new Trie(['car', 'card', 'care', 'careful', 'can', 'cat']);
|
|
@@ -396,6 +540,30 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
396
540
|
|
|
397
541
|
|
|
398
542
|
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
399
567
|
* @example
|
|
400
568
|
* // Check if a prefix exists
|
|
401
569
|
* const trie = new Trie(['hello', 'help', 'world']);
|
|
@@ -427,6 +595,30 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
427
595
|
|
|
428
596
|
|
|
429
597
|
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
430
622
|
* @example
|
|
431
623
|
* // Find shared prefix
|
|
432
624
|
* const trie = new Trie(['flower', 'flow', 'flight']);
|
|
@@ -452,6 +644,30 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
452
644
|
|
|
453
645
|
|
|
454
646
|
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
455
671
|
* @example
|
|
456
672
|
* // Trie getWords and prefix search
|
|
457
673
|
* const trie = new Trie(['apple', 'app', 'apply', 'application', 'apricot']);
|
|
@@ -477,6 +693,30 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
477
693
|
|
|
478
694
|
|
|
479
695
|
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
480
720
|
* @example
|
|
481
721
|
* // Create independent copy
|
|
482
722
|
* const trie = new Trie(['hello', 'world']);
|
|
@@ -499,13 +739,37 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
499
739
|
|
|
500
740
|
|
|
501
741
|
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
|
|
502
766
|
* @example
|
|
503
767
|
* // Filter words
|
|
504
768
|
* const trie = new Trie(['cat', 'car', 'dog', 'card']);
|
|
505
769
|
* const result = trie.filter(w => w.startsWith('ca'));
|
|
506
770
|
* console.log(result.size); // 3;
|
|
507
771
|
*/
|
|
508
|
-
filter(predicate: ElementCallback<string, R, boolean>, thisArg?:
|
|
772
|
+
filter(predicate: ElementCallback<string, R, boolean>, thisArg?: unknown): this;
|
|
509
773
|
/**
|
|
510
774
|
* Transform words
|
|
511
775
|
|
|
@@ -516,13 +780,37 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
516
780
|
|
|
517
781
|
|
|
518
782
|
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
|
|
519
807
|
* @example
|
|
520
808
|
* // Transform words
|
|
521
809
|
* const trie = new Trie(['hello', 'world']);
|
|
522
810
|
* const upper = trie.map(w => w.toUpperCase());
|
|
523
811
|
* console.log(upper.has('HELLO')); // true;
|
|
524
812
|
*/
|
|
525
|
-
map<RM>(callback: ElementCallback<string, R, string>, options?: TrieOptions<RM>, thisArg?:
|
|
813
|
+
map<RM>(callback: ElementCallback<string, R, string>, options?: TrieOptions<RM>, thisArg?: unknown): Trie<RM>;
|
|
526
814
|
/**
|
|
527
815
|
* Map words into a new trie (possibly different record type).
|
|
528
816
|
* @remarks Time O(ΣL), Space O(ΣL)
|
|
@@ -533,7 +821,7 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
533
821
|
* @param [thisArg] - Value for `this` inside the callback.
|
|
534
822
|
* @returns A new Trie constructed from mapped words.
|
|
535
823
|
*/
|
|
536
|
-
map<EM, RM>(callback: ElementCallback<string, R, EM>, options?: TrieOptions<RM>, thisArg?:
|
|
824
|
+
map<EM, RM>(callback: ElementCallback<string, R, EM>, options?: TrieOptions<RM>, thisArg?: unknown): IterableElementBase<EM, RM>;
|
|
537
825
|
/**
|
|
538
826
|
* Map words into a new trie of the same element type.
|
|
539
827
|
* @remarks Time O(ΣL), Space O(ΣL)
|
|
@@ -541,7 +829,7 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
|
|
|
541
829
|
* @param [thisArg] - Value for `this` inside the callback.
|
|
542
830
|
* @returns A new trie with mapped words.
|
|
543
831
|
*/
|
|
544
|
-
mapSame(callback: ElementCallback<string, R, string>, thisArg?:
|
|
832
|
+
mapSame(callback: ElementCallback<string, R, string>, thisArg?: unknown): this;
|
|
545
833
|
/**
|
|
546
834
|
* (Protected) Create an empty instance of the same concrete class.
|
|
547
835
|
* @remarks Time O(1), Space O(1)
|
|
@@ -5,10 +5,10 @@ export type Comparator<K> = (a: K, b: K) => number;
|
|
|
5
5
|
export type DFSOrderPattern = 'PRE' | 'IN' | 'POST';
|
|
6
6
|
export type NodeDisplayLayout = [string[], number, number, number];
|
|
7
7
|
export interface IterableWithSize<T> extends Iterable<T> {
|
|
8
|
-
size: number | ((...args:
|
|
8
|
+
size: number | ((...args: unknown[]) => number);
|
|
9
9
|
}
|
|
10
10
|
export interface IterableWithLength<T> extends Iterable<T> {
|
|
11
|
-
length: number | ((...args:
|
|
11
|
+
length: number | ((...args: unknown[]) => number);
|
|
12
12
|
}
|
|
13
13
|
export type OptValue<V> = V | undefined;
|
|
14
14
|
export type IterableWithSizeOrLength<T> = IterableWithSize<T> | IterableWithLength<T>;
|
|
@@ -3,6 +3,7 @@ import type { Comparator, OptValue } from '../../common';
|
|
|
3
3
|
type BSTBaseOptions<K, V, R> = Omit<BinaryTreeOptions<K, V, R>, 'isDuplicate'>;
|
|
4
4
|
export type BSTOptions<K, V, R> = BSTBaseOptions<K, V, R> & {
|
|
5
5
|
comparator?: Comparator<K>;
|
|
6
|
+
enableOrderStatistic?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export type BSTNOptKey<K> = K | undefined;
|
|
8
9
|
export type OptNode<NODE> = NODE | undefined;
|
|
@@ -8,6 +8,11 @@ export interface TreeMapOptions<K, V, R = [K, V]> {
|
|
|
8
8
|
* - `false`: store values on tree nodes (Node Mode).
|
|
9
9
|
*/
|
|
10
10
|
isMapMode?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Enable order-statistic operations (select, rank, rangeByRank).
|
|
13
|
+
* When true, subtree counts are maintained on every node.
|
|
14
|
+
*/
|
|
15
|
+
enableOrderStatistic?: boolean;
|
|
11
16
|
/**
|
|
12
17
|
* Transform raw elements into `[key, value]` entries.
|
|
13
18
|
* When provided, the constructor accepts `Iterable<R>` instead of `Iterable<[K, V]>`.
|
|
@@ -8,6 +8,10 @@ export interface TreeMultiSetOptions<K, R = K> {
|
|
|
8
8
|
* - `false`: Node Mode.
|
|
9
9
|
*/
|
|
10
10
|
isMapMode?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Enable order-statistic operations (select, rank, rangeByRank).
|
|
13
|
+
*/
|
|
14
|
+
enableOrderStatistic?: boolean;
|
|
11
15
|
/**
|
|
12
16
|
* Transform raw elements into keys.
|
|
13
17
|
* When provided, the constructor accepts `Iterable<R>` instead of `Iterable<K>`.
|
|
@@ -8,6 +8,10 @@ export interface TreeSetOptions<K, R = K> {
|
|
|
8
8
|
* - `false`: store values on tree nodes (Node Mode).
|
|
9
9
|
*/
|
|
10
10
|
isMapMode?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Enable order-statistic operations (select, rank, rangeByRank).
|
|
13
|
+
*/
|
|
14
|
+
enableOrderStatistic?: boolean;
|
|
11
15
|
/**
|
|
12
16
|
* Transform raw elements into keys.
|
|
13
17
|
* When provided, the constructor accepts `Iterable<R>` instead of `Iterable<K>`.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export type KeyValueObject = {
|
|
2
|
-
[key: string]:
|
|
2
|
+
[key: string]: unknown;
|
|
3
3
|
};
|
|
4
4
|
export type KeyValueObjectWithKey = {
|
|
5
|
-
[key: string]:
|
|
5
|
+
[key: string]: unknown;
|
|
6
6
|
key: string | number | symbol;
|
|
7
7
|
};
|
|
8
8
|
export type NonNumberNonObjectButDefined = string | boolean | symbol | null;
|
|
9
9
|
export type ObjectWithoutKey = Omit<KeyValueObject, 'key'>;
|
|
10
10
|
export type ObjectWithNonNumberKey = {
|
|
11
|
-
[key: string]:
|
|
11
|
+
[key: string]: unknown;
|
|
12
12
|
key: string | boolean | symbol | null | object | undefined;
|
|
13
13
|
};
|
|
14
14
|
export type ObjectWithNumberKey = {
|
|
15
|
-
[key: string]:
|
|
15
|
+
[key: string]: unknown;
|
|
16
16
|
key: number;
|
|
17
17
|
};
|
|
18
18
|
export type RestrictValByKey = NonNumberNonObjectButDefined | ObjectWithoutKey | ObjectWithNonNumberKey | ObjectWithNumberKey;
|