1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | declare var NaN: number;
|
26 | declare var Infinity: number;
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | declare function eval(x: string): any;
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | declare function parseInt(string: string, radix?: number): number;
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | declare function parseFloat(string: string): number;
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | declare function isNaN(number: number): boolean;
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | declare function isFinite(number: number): boolean;
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 | declare function decodeURI(encodedURI: string): string;
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 | declare function decodeURIComponent(encodedURIComponent: string): string;
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 | declare function encodeURI(uri: string): string;
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 | declare function encodeURIComponent(uriComponent: string | number | boolean): string;
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 | declare function escape(string: string): string;
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 | declare function unescape(string: string): string;
|
98 |
|
99 | interface Symbol {
|
100 |
|
101 | toString(): string;
|
102 |
|
103 |
|
104 | valueOf(): symbol;
|
105 | }
|
106 |
|
107 | declare type PropertyKey = string | number | symbol;
|
108 |
|
109 | interface PropertyDescriptor {
|
110 | configurable?: boolean;
|
111 | enumerable?: boolean;
|
112 | value?: any;
|
113 | writable?: boolean;
|
114 | get?(): any;
|
115 | set?(v: any): void;
|
116 | }
|
117 |
|
118 | interface PropertyDescriptorMap {
|
119 | [key: PropertyKey]: PropertyDescriptor;
|
120 | }
|
121 |
|
122 | interface Object {
|
123 |
|
124 | constructor: Function;
|
125 |
|
126 | /** Returns a string representation of an object. */
|
127 | toString(): string;
|
128 |
|
129 | /** Returns a date converted to a string using the current locale. */
|
130 | toLocaleString(): string;
|
131 |
|
132 | /** Returns the primitive value of the specified object. */
|
133 | valueOf(): Object;
|
134 |
|
135 | /**
|
136 | * Determines whether an object has a property with the specified name.
|
137 | * @param v A property name.
|
138 | */
|
139 | hasOwnProperty(v: PropertyKey): boolean;
|
140 |
|
141 | /**
|
142 | * Determines whether an object exists in another object's prototype chain.
|
143 | * @param v Another object whose prototype chain is to be checked.
|
144 | */
|
145 | isPrototypeOf(v: Object): boolean;
|
146 |
|
147 | /**
|
148 | * Determines whether a specified property is enumerable.
|
149 | * @param v A property name.
|
150 | */
|
151 | propertyIsEnumerable(v: PropertyKey): boolean;
|
152 | }
|
153 |
|
154 | interface ObjectConstructor {
|
155 | new(value?: any): Object;
|
156 | (): any;
|
157 | (value: any): any;
|
158 |
|
159 |
|
160 | readonly prototype: Object;
|
161 |
|
162 | |
163 |
|
164 |
|
165 |
|
166 | getPrototypeOf(o: any): any;
|
167 |
|
168 | |
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 | getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined;
|
175 |
|
176 | |
177 |
|
178 |
|
179 |
|
180 |
|
181 | getOwnPropertyNames(o: any): string[];
|
182 |
|
183 | |
184 |
|
185 |
|
186 |
|
187 | create(o: object | null): any;
|
188 |
|
189 | |
190 |
|
191 |
|
192 |
|
193 |
|
194 | create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
|
195 |
|
196 | |
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 | defineProperty<T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): T;
|
203 |
|
204 | |
205 |
|
206 |
|
207 |
|
208 |
|
209 | defineProperties<T>(o: T, properties: PropertyDescriptorMap & ThisType<any>): T;
|
210 |
|
211 | |
212 |
|
213 |
|
214 |
|
215 | seal<T>(o: T): T;
|
216 |
|
217 | |
218 |
|
219 |
|
220 |
|
221 | freeze<T>(a: T[]): readonly T[];
|
222 |
|
223 | |
224 |
|
225 |
|
226 |
|
227 | freeze<T extends Function>(f: T): T;
|
228 |
|
229 | |
230 |
|
231 |
|
232 |
|
233 | freeze<T extends {[idx: string]: U | null | undefined | object}, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;
|
234 |
|
235 | |
236 |
|
237 |
|
238 |
|
239 | freeze<T>(o: T): Readonly<T>;
|
240 |
|
241 | |
242 |
|
243 |
|
244 |
|
245 | preventExtensions<T>(o: T): T;
|
246 |
|
247 | |
248 |
|
249 |
|
250 |
|
251 | isSealed(o: any): boolean;
|
252 |
|
253 | |
254 |
|
255 |
|
256 |
|
257 | isFrozen(o: any): boolean;
|
258 |
|
259 | |
260 |
|
261 |
|
262 |
|
263 | isExtensible(o: any): boolean;
|
264 |
|
265 | |
266 |
|
267 |
|
268 |
|
269 | keys(o: object): string[];
|
270 | }
|
271 |
|
272 |
|
273 |
|
274 |
|
275 | declare var Object: ObjectConstructor;
|
276 |
|
277 |
|
278 |
|
279 |
|
280 | interface Function {
|
281 | |
282 |
|
283 |
|
284 |
|
285 |
|
286 | apply(this: Function, thisArg: any, argArray?: any): any;
|
287 |
|
288 | |
289 |
|
290 |
|
291 |
|
292 |
|
293 | call(this: Function, thisArg: any, ...argArray: any[]): any;
|
294 |
|
295 | |
296 |
|
297 |
|
298 |
|
299 |
|
300 |
|
301 | bind(this: Function, thisArg: any, ...argArray: any[]): any;
|
302 |
|
303 |
|
304 | toString(): string;
|
305 |
|
306 | prototype: any;
|
307 | readonly length: number;
|
308 |
|
309 |
|
310 | arguments: any;
|
311 | caller: Function;
|
312 | }
|
313 |
|
314 | interface FunctionConstructor {
|
315 | |
316 |
|
317 |
|
318 |
|
319 | new(...args: string[]): Function;
|
320 | (...args: string[]): Function;
|
321 | readonly prototype: Function;
|
322 | }
|
323 |
|
324 | declare var Function: FunctionConstructor;
|
325 |
|
326 |
|
327 |
|
328 |
|
329 | type ThisParameterType<T> = T extends (this: infer U, ...args: never) => any ? U : unknown;
|
330 |
|
331 |
|
332 |
|
333 |
|
334 | type OmitThisParameter<T> = unknown extends ThisParameterType<T> ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T;
|
335 |
|
336 | interface CallableFunction extends Function {
|
337 | |
338 |
|
339 |
|
340 |
|
341 |
|
342 | apply<T, R>(this: (this: T) => R, thisArg: T): R;
|
343 | apply<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R;
|
344 |
|
345 | /**
|
346 | * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
|
347 | * @param thisArg The object to be used as the this object.
|
348 | * @param args Argument values to be passed to the function.
|
349 | */
|
350 | call<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R;
|
351 |
|
352 | /**
|
353 | * For a given function, creates a bound function that has the same body as the original function.
|
354 | * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
|
355 | * @param thisArg The object to be used as the this object.
|
356 | * @param args Arguments to bind to the parameters of the function.
|
357 | */
|
358 | bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>;
|
359 | bind<T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R;
|
360 | bind<T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R;
|
361 | bind<T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R;
|
362 | bind<T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R;
|
363 | bind<T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R;
|
364 | }
|
365 |
|
366 | interface NewableFunction extends Function {
|
367 | |
368 |
|
369 |
|
370 |
|
371 |
|
372 | apply<T>(this: new () => T, thisArg: T): void;
|
373 | apply<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void;
|
374 |
|
375 | /**
|
376 | * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
|
377 | * @param thisArg The object to be used as the this object.
|
378 | * @param args Argument values to be passed to the function.
|
379 | */
|
380 | call<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A): void;
|
381 |
|
382 | /**
|
383 | * For a given function, creates a bound function that has the same body as the original function.
|
384 | * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
|
385 | * @param thisArg The object to be used as the this object.
|
386 | * @param args Arguments to bind to the parameters of the function.
|
387 | */
|
388 | bind<T>(this: T, thisArg: any): T;
|
389 | bind<A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R;
|
390 | bind<A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R;
|
391 | bind<A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R;
|
392 | bind<A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R;
|
393 | bind<AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R;
|
394 | }
|
395 |
|
396 | interface IArguments {
|
397 | [index: number]: any;
|
398 | length: number;
|
399 | callee: Function;
|
400 | }
|
401 |
|
402 | interface String {
|
403 |
|
404 | toString(): string;
|
405 |
|
406 | |
407 |
|
408 |
|
409 |
|
410 | charAt(pos: number): string;
|
411 |
|
412 | |
413 |
|
414 |
|
415 |
|
416 | charCodeAt(index: number): number;
|
417 |
|
418 | |
419 |
|
420 |
|
421 |
|
422 | concat(...strings: string[]): string;
|
423 |
|
424 | |
425 |
|
426 |
|
427 |
|
428 |
|
429 | indexOf(searchString: string, position?: number): number;
|
430 |
|
431 | |
432 |
|
433 |
|
434 |
|
435 |
|
436 | lastIndexOf(searchString: string, position?: number): number;
|
437 |
|
438 | |
439 |
|
440 |
|
441 |
|
442 | localeCompare(that: string): number;
|
443 |
|
444 | |
445 |
|
446 |
|
447 |
|
448 | match(regexp: string | RegExp): RegExpMatchArray | null;
|
449 |
|
450 | |
451 |
|
452 |
|
453 |
|
454 |
|
455 | replace(searchValue: string | RegExp, replaceValue: string): string;
|
456 |
|
457 | |
458 |
|
459 |
|
460 |
|
461 |
|
462 | replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
463 |
|
464 | |
465 |
|
466 |
|
467 |
|
468 | search(regexp: string | RegExp): number;
|
469 |
|
470 | |
471 |
|
472 |
|
473 |
|
474 |
|
475 |
|
476 | slice(start?: number, end?: number): string;
|
477 |
|
478 | |
479 |
|
480 |
|
481 |
|
482 |
|
483 | split(separator: string | RegExp, limit?: number): string[];
|
484 |
|
485 | |
486 |
|
487 |
|
488 |
|
489 |
|
490 |
|
491 | substring(start: number, end?: number): string;
|
492 |
|
493 |
|
494 | toLowerCase(): string;
|
495 |
|
496 |
|
497 | toLocaleLowerCase(locales?: string | string[]): string;
|
498 |
|
499 |
|
500 | toUpperCase(): string;
|
501 |
|
502 |
|
503 | toLocaleUpperCase(locales?: string | string[]): string;
|
504 |
|
505 |
|
506 | trim(): string;
|
507 |
|
508 |
|
509 | readonly length: number;
|
510 |
|
511 |
|
512 | |
513 |
|
514 |
|
515 |
|
516 |
|
517 |
|
518 | substr(from: number, length?: number): string;
|
519 |
|
520 |
|
521 | valueOf(): string;
|
522 |
|
523 | readonly [index: number]: string;
|
524 | }
|
525 |
|
526 | interface StringConstructor {
|
527 | new(value?: any): String;
|
528 | (value?: any): string;
|
529 | readonly prototype: String;
|
530 | fromCharCode(...codes: number[]): string;
|
531 | }
|
532 |
|
533 |
|
534 |
|
535 |
|
536 | declare var String: StringConstructor;
|
537 |
|
538 | interface Boolean {
|
539 |
|
540 | valueOf(): boolean;
|
541 | }
|
542 |
|
543 | interface BooleanConstructor {
|
544 | new(value?: any): Boolean;
|
545 | <T>(value?: T): boolean;
|
546 | readonly prototype: Boolean;
|
547 | }
|
548 |
|
549 | declare var Boolean: BooleanConstructor;
|
550 |
|
551 | interface Number {
|
552 | |
553 |
|
554 |
|
555 |
|
556 | toString(radix?: number): string;
|
557 |
|
558 | |
559 |
|
560 |
|
561 |
|
562 | toFixed(fractionDigits?: number): string;
|
563 |
|
564 | |
565 |
|
566 |
|
567 |
|
568 | toExponential(fractionDigits?: number): string;
|
569 |
|
570 | |
571 |
|
572 |
|
573 |
|
574 | toPrecision(precision?: number): string;
|
575 |
|
576 |
|
577 | valueOf(): number;
|
578 | }
|
579 |
|
580 | interface NumberConstructor {
|
581 | new(value?: any): Number;
|
582 | (value?: any): number;
|
583 | readonly prototype: Number;
|
584 |
|
585 |
|
586 | readonly MAX_VALUE: number;
|
587 |
|
588 |
|
589 | readonly MIN_VALUE: number;
|
590 |
|
591 | |
592 |
|
593 |
|
594 |
|
595 | readonly NaN: number;
|
596 |
|
597 | |
598 |
|
599 |
|
600 |
|
601 | readonly NEGATIVE_INFINITY: number;
|
602 |
|
603 | |
604 |
|
605 |
|
606 |
|
607 | readonly POSITIVE_INFINITY: number;
|
608 | }
|
609 |
|
610 |
|
611 | declare var Number: NumberConstructor;
|
612 |
|
613 | interface TemplateStringsArray extends ReadonlyArray<string> {
|
614 | readonly raw: readonly string[];
|
615 | }
|
616 |
|
617 |
|
618 |
|
619 |
|
620 |
|
621 |
|
622 |
|
623 | interface ImportMeta {
|
624 | }
|
625 |
|
626 |
|
627 |
|
628 |
|
629 |
|
630 |
|
631 |
|
632 | interface ImportCallOptions {
|
633 | assert?: ImportAssertions;
|
634 | }
|
635 |
|
636 |
|
637 |
|
638 |
|
639 | interface ImportAssertions {
|
640 | [key: string]: string;
|
641 | }
|
642 |
|
643 | interface Math {
|
644 |
|
645 | readonly E: number;
|
646 |
|
647 | readonly LN10: number;
|
648 |
|
649 | readonly LN2: number;
|
650 |
|
651 | readonly LOG2E: number;
|
652 |
|
653 | readonly LOG10E: number;
|
654 |
|
655 | readonly PI: number;
|
656 |
|
657 | readonly SQRT1_2: number;
|
658 |
|
659 | readonly SQRT2: number;
|
660 | |
661 |
|
662 |
|
663 |
|
664 |
|
665 | abs(x: number): number;
|
666 | |
667 |
|
668 |
|
669 |
|
670 | acos(x: number): number;
|
671 | |
672 |
|
673 |
|
674 |
|
675 | asin(x: number): number;
|
676 | |
677 |
|
678 |
|
679 |
|
680 | atan(x: number): number;
|
681 | |
682 |
|
683 |
|
684 |
|
685 |
|
686 | atan2(y: number, x: number): number;
|
687 | |
688 |
|
689 |
|
690 |
|
691 | ceil(x: number): number;
|
692 | |
693 |
|
694 |
|
695 |
|
696 | cos(x: number): number;
|
697 | |
698 |
|
699 |
|
700 |
|
701 | exp(x: number): number;
|
702 | |
703 |
|
704 |
|
705 |
|
706 | floor(x: number): number;
|
707 | |
708 |
|
709 |
|
710 |
|
711 | log(x: number): number;
|
712 | |
713 |
|
714 |
|
715 |
|
716 | max(...values: number[]): number;
|
717 | |
718 |
|
719 |
|
720 |
|
721 | min(...values: number[]): number;
|
722 | |
723 |
|
724 |
|
725 |
|
726 |
|
727 | pow(x: number, y: number): number;
|
728 |
|
729 | random(): number;
|
730 | |
731 |
|
732 |
|
733 |
|
734 | round(x: number): number;
|
735 | |
736 |
|
737 |
|
738 |
|
739 | sin(x: number): number;
|
740 | |
741 |
|
742 |
|
743 |
|
744 | sqrt(x: number): number;
|
745 | |
746 |
|
747 |
|
748 |
|
749 | tan(x: number): number;
|
750 | }
|
751 |
|
752 | declare var Math: Math;
|
753 |
|
754 |
|
755 | interface Date {
|
756 |
|
757 | toString(): string;
|
758 |
|
759 | toDateString(): string;
|
760 |
|
761 | toTimeString(): string;
|
762 |
|
763 | toLocaleString(): string;
|
764 |
|
765 | toLocaleDateString(): string;
|
766 |
|
767 | toLocaleTimeString(): string;
|
768 |
|
769 | valueOf(): number;
|
770 |
|
771 | getTime(): number;
|
772 |
|
773 | getFullYear(): number;
|
774 |
|
775 | getUTCFullYear(): number;
|
776 |
|
777 | getMonth(): number;
|
778 |
|
779 | getUTCMonth(): number;
|
780 |
|
781 | getDate(): number;
|
782 |
|
783 | getUTCDate(): number;
|
784 |
|
785 | getDay(): number;
|
786 |
|
787 | getUTCDay(): number;
|
788 |
|
789 | getHours(): number;
|
790 |
|
791 | getUTCHours(): number;
|
792 |
|
793 | getMinutes(): number;
|
794 |
|
795 | getUTCMinutes(): number;
|
796 |
|
797 | getSeconds(): number;
|
798 |
|
799 | getUTCSeconds(): number;
|
800 |
|
801 | getMilliseconds(): number;
|
802 |
|
803 | getUTCMilliseconds(): number;
|
804 |
|
805 | getTimezoneOffset(): number;
|
806 | |
807 |
|
808 |
|
809 |
|
810 | setTime(time: number): number;
|
811 | |
812 |
|
813 |
|
814 |
|
815 | setMilliseconds(ms: number): number;
|
816 | |
817 |
|
818 |
|
819 |
|
820 | setUTCMilliseconds(ms: number): number;
|
821 |
|
822 | |
823 |
|
824 |
|
825 |
|
826 |
|
827 | setSeconds(sec: number, ms?: number): number;
|
828 | |
829 |
|
830 |
|
831 |
|
832 |
|
833 | setUTCSeconds(sec: number, ms?: number): number;
|
834 | |
835 |
|
836 |
|
837 |
|
838 |
|
839 |
|
840 | setMinutes(min: number, sec?: number, ms?: number): number;
|
841 | |
842 |
|
843 |
|
844 |
|
845 |
|
846 |
|
847 | setUTCMinutes(min: number, sec?: number, ms?: number): number;
|
848 | |
849 |
|
850 |
|
851 |
|
852 |
|
853 |
|
854 |
|
855 | setHours(hours: number, min?: number, sec?: number, ms?: number): number;
|
856 | |
857 |
|
858 |
|
859 |
|
860 |
|
861 |
|
862 |
|
863 | setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
|
864 | |
865 |
|
866 |
|
867 |
|
868 | setDate(date: number): number;
|
869 | |
870 |
|
871 |
|
872 |
|
873 | setUTCDate(date: number): number;
|
874 | |
875 |
|
876 |
|
877 |
|
878 |
|
879 | setMonth(month: number, date?: number): number;
|
880 | |
881 |
|
882 |
|
883 |
|
884 |
|
885 | setUTCMonth(month: number, date?: number): number;
|
886 | |
887 |
|
888 |
|
889 |
|
890 |
|
891 |
|
892 | setFullYear(year: number, month?: number, date?: number): number;
|
893 | |
894 |
|
895 |
|
896 |
|
897 |
|
898 |
|
899 | setUTCFullYear(year: number, month?: number, date?: number): number;
|
900 |
|
901 | toUTCString(): string;
|
902 |
|
903 | toISOString(): string;
|
904 |
|
905 | toJSON(key?: any): string;
|
906 | }
|
907 |
|
908 | interface DateConstructor {
|
909 | new(): Date;
|
910 | new(value: number | string): Date;
|
911 | new(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
|
912 | (): string;
|
913 | readonly prototype: Date;
|
914 | |
915 |
|
916 |
|
917 |
|
918 | parse(s: string): number;
|
919 | |
920 |
|
921 |
|
922 |
|
923 |
|
924 |
|
925 |
|
926 |
|
927 |
|
928 |
|
929 | UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
|
930 | now(): number;
|
931 | }
|
932 |
|
933 | declare var Date: DateConstructor;
|
934 |
|
935 | interface RegExpMatchArray extends Array<string> {
|
936 | |
937 |
|
938 |
|
939 | index?: number;
|
940 | |
941 |
|
942 |
|
943 | input?: string;
|
944 | }
|
945 |
|
946 | interface RegExpExecArray extends Array<string> {
|
947 | |
948 |
|
949 |
|
950 | index: number;
|
951 | |
952 |
|
953 |
|
954 | input: string;
|
955 | }
|
956 |
|
957 | interface RegExp {
|
958 | |
959 |
|
960 |
|
961 |
|
962 | exec(string: string): RegExpExecArray | null;
|
963 |
|
964 | |
965 |
|
966 |
|
967 |
|
968 | test(string: string): boolean;
|
969 |
|
970 |
|
971 | readonly source: string;
|
972 |
|
973 |
|
974 | readonly global: boolean;
|
975 |
|
976 |
|
977 | readonly ignoreCase: boolean;
|
978 |
|
979 |
|
980 | readonly multiline: boolean;
|
981 |
|
982 | lastIndex: number;
|
983 |
|
984 |
|
985 |
|
986 | compile(pattern: string, flags?: string): this;
|
987 | }
|
988 |
|
989 | interface RegExpConstructor {
|
990 | new(pattern: RegExp | string): RegExp;
|
991 | new(pattern: string, flags?: string): RegExp;
|
992 | (pattern: RegExp | string): RegExp;
|
993 | (pattern: string, flags?: string): RegExp;
|
994 | readonly prototype: RegExp;
|
995 |
|
996 |
|
997 |
|
998 | $1: string;
|
999 |
|
1000 | $2: string;
|
1001 |
|
1002 | $3: string;
|
1003 |
|
1004 | $4: string;
|
1005 |
|
1006 | $5: string;
|
1007 |
|
1008 | $6: string;
|
1009 |
|
1010 | $7: string;
|
1011 |
|
1012 | $8: string;
|
1013 |
|
1014 | $9: string;
|
1015 |
|
1016 | input: string;
|
1017 |
|
1018 | $_: string;
|
1019 |
|
1020 | lastMatch: string;
|
1021 |
|
1022 | "$&": string;
|
1023 |
|
1024 | lastParen: string;
|
1025 |
|
1026 | "$+": string;
|
1027 |
|
1028 | leftContext: string;
|
1029 |
|
1030 | "$`": string;
|
1031 |
|
1032 | rightContext: string;
|
1033 |
|
1034 | "$'": string;
|
1035 | }
|
1036 |
|
1037 | declare var RegExp: RegExpConstructor;
|
1038 |
|
1039 | interface Error {
|
1040 | name: string;
|
1041 | message: string;
|
1042 | stack?: string;
|
1043 | }
|
1044 |
|
1045 | interface ErrorConstructor {
|
1046 | new(message?: string): Error;
|
1047 | (message?: string): Error;
|
1048 | readonly prototype: Error;
|
1049 | }
|
1050 |
|
1051 | declare var Error: ErrorConstructor;
|
1052 |
|
1053 | interface EvalError extends Error {
|
1054 | }
|
1055 |
|
1056 | interface EvalErrorConstructor extends ErrorConstructor {
|
1057 | new(message?: string): EvalError;
|
1058 | (message?: string): EvalError;
|
1059 | readonly prototype: EvalError;
|
1060 | }
|
1061 |
|
1062 | declare var EvalError: EvalErrorConstructor;
|
1063 |
|
1064 | interface RangeError extends Error {
|
1065 | }
|
1066 |
|
1067 | interface RangeErrorConstructor extends ErrorConstructor {
|
1068 | new(message?: string): RangeError;
|
1069 | (message?: string): RangeError;
|
1070 | readonly prototype: RangeError;
|
1071 | }
|
1072 |
|
1073 | declare var RangeError: RangeErrorConstructor;
|
1074 |
|
1075 | interface ReferenceError extends Error {
|
1076 | }
|
1077 |
|
1078 | interface ReferenceErrorConstructor extends ErrorConstructor {
|
1079 | new(message?: string): ReferenceError;
|
1080 | (message?: string): ReferenceError;
|
1081 | readonly prototype: ReferenceError;
|
1082 | }
|
1083 |
|
1084 | declare var ReferenceError: ReferenceErrorConstructor;
|
1085 |
|
1086 | interface SyntaxError extends Error {
|
1087 | }
|
1088 |
|
1089 | interface SyntaxErrorConstructor extends ErrorConstructor {
|
1090 | new(message?: string): SyntaxError;
|
1091 | (message?: string): SyntaxError;
|
1092 | readonly prototype: SyntaxError;
|
1093 | }
|
1094 |
|
1095 | declare var SyntaxError: SyntaxErrorConstructor;
|
1096 |
|
1097 | interface TypeError extends Error {
|
1098 | }
|
1099 |
|
1100 | interface TypeErrorConstructor extends ErrorConstructor {
|
1101 | new(message?: string): TypeError;
|
1102 | (message?: string): TypeError;
|
1103 | readonly prototype: TypeError;
|
1104 | }
|
1105 |
|
1106 | declare var TypeError: TypeErrorConstructor;
|
1107 |
|
1108 | interface URIError extends Error {
|
1109 | }
|
1110 |
|
1111 | interface URIErrorConstructor extends ErrorConstructor {
|
1112 | new(message?: string): URIError;
|
1113 | (message?: string): URIError;
|
1114 | readonly prototype: URIError;
|
1115 | }
|
1116 |
|
1117 | declare var URIError: URIErrorConstructor;
|
1118 |
|
1119 | interface JSON {
|
1120 | |
1121 |
|
1122 |
|
1123 |
|
1124 |
|
1125 |
|
1126 | parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
|
1127 | |
1128 |
|
1129 |
|
1130 |
|
1131 |
|
1132 |
|
1133 | stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
1134 | |
1135 |
|
1136 |
|
1137 |
|
1138 |
|
1139 |
|
1140 | stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
1141 | }
|
1142 |
|
1143 |
|
1144 |
|
1145 |
|
1146 | declare var JSON: JSON;
|
1147 |
|
1148 |
|
1149 |
|
1150 |
|
1151 |
|
1152 |
|
1153 | interface ReadonlyArray<T> {
|
1154 | |
1155 |
|
1156 |
|
1157 | readonly length: number;
|
1158 | |
1159 |
|
1160 |
|
1161 | toString(): string;
|
1162 | |
1163 |
|
1164 |
|
1165 | toLocaleString(): string;
|
1166 | |
1167 |
|
1168 |
|
1169 |
|
1170 | concat(...items: ConcatArray<T>[]): T[];
|
1171 | |
1172 |
|
1173 |
|
1174 |
|
1175 | concat(...items: (T | ConcatArray<T>)[]): T[];
|
1176 | |
1177 |
|
1178 |
|
1179 |
|
1180 | join(separator?: string): string;
|
1181 | |
1182 |
|
1183 |
|
1184 |
|
1185 |
|
1186 | slice(start?: number, end?: number): T[];
|
1187 | |
1188 |
|
1189 |
|
1190 |
|
1191 |
|
1192 | indexOf(searchElement: T, fromIndex?: number): number;
|
1193 | |
1194 |
|
1195 |
|
1196 |
|
1197 |
|
1198 | lastIndexOf(searchElement: T, fromIndex?: number): number;
|
1199 | |
1200 |
|
1201 |
|
1202 |
|
1203 |
|
1204 |
|
1205 |
|
1206 |
|
1207 | every<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[];
|
1208 | /**
|
1209 | * Determines whether all the members of an array satisfy the specified test.
|
1210 | * @param predicate A function that accepts up to three arguments. The every method calls
|
1211 | * the predicate function for each element in the array until the predicate returns a value
|
1212 | * which is coercible to the Boolean value false, or until the end of the array.
|
1213 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
1214 | * If thisArg is omitted, undefined is used as the this value.
|
1215 | */
|
1216 | every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
|
1217 | /**
|
1218 | * Determines whether the specified callback function returns true for any element of an array.
|
1219 | * @param predicate A function that accepts up to three arguments. The some method calls
|
1220 | * the predicate function for each element in the array until the predicate returns a value
|
1221 | * which is coercible to the Boolean value true, or until the end of the array.
|
1222 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
1223 | * If thisArg is omitted, undefined is used as the this value.
|
1224 | */
|
1225 | some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
|
1226 | /**
|
1227 | * Performs the specified action for each element in an array.
|
1228 | * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
|
1229 | * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
1230 | */
|
1231 | forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void;
|
1232 | /**
|
1233 | * Calls a defined callback function on each element of an array, and returns an array that contains the results.
|
1234 | * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
1235 | * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
1236 | */
|
1237 | map<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[];
|
1238 | /**
|
1239 | * Returns the elements of an array that meet the condition specified in a callback function.
|
1240 | * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
|
1241 | * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
1242 | */
|
1243 | filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[];
|
1244 | /**
|
1245 | * Returns the elements of an array that meet the condition specified in a callback function.
|
1246 | * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
|
1247 | * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
1248 | */
|
1249 | filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[];
|
1250 | /**
|
1251 | * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
1252 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
1253 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
1254 | */
|
1255 | reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
|
1256 | reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
|
1257 | /**
|
1258 | * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
1259 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
1260 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
1261 | */
|
1262 | reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
|
1263 | /**
|
1264 | * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
1265 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
1266 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
1267 | */
|
1268 | reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
|
1269 | reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
|
1270 | /**
|
1271 | * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
1272 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
1273 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
1274 | */
|
1275 | reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
|
1276 |
|
1277 | readonly [n: number]: T;
|
1278 | }
|
1279 |
|
1280 | interface ConcatArray<T> {
|
1281 | readonly length: number;
|
1282 | readonly [n: number]: T;
|
1283 | join(separator?: string): string;
|
1284 | slice(start?: number, end?: number): T[];
|
1285 | }
|
1286 |
|
1287 | interface Array<T> {
|
1288 | /**
|
1289 | * Gets or sets the length of the array. This is a number one higher than the highest index in the array.
|
1290 | */
|
1291 | length: number;
|
1292 | /**
|
1293 | * Returns a string representation of an array.
|
1294 | */
|
1295 | toString(): string;
|
1296 | /**
|
1297 | * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
|
1298 | */
|
1299 | toLocaleString(): string;
|
1300 | /**
|
1301 | * Removes the last element from an array and returns it.
|
1302 | * If the array is empty, undefined is returned and the array is not modified.
|
1303 | */
|
1304 | pop(): T | undefined;
|
1305 | /**
|
1306 | * Appends new elements to the end of an array, and returns the new length of the array.
|
1307 | * @param items New elements to add to the array.
|
1308 | */
|
1309 | push(...items: T[]): number;
|
1310 | /**
|
1311 | * Combines two or more arrays.
|
1312 | * This method returns a new array without modifying any existing arrays.
|
1313 | * @param items Additional arrays and/or items to add to the end of the array.
|
1314 | */
|
1315 | concat(...items: ConcatArray<T>[]): T[];
|
1316 | /**
|
1317 | * Combines two or more arrays.
|
1318 | * This method returns a new array without modifying any existing arrays.
|
1319 | * @param items Additional arrays and/or items to add to the end of the array.
|
1320 | */
|
1321 | concat(...items: (T | ConcatArray<T>)[]): T[];
|
1322 | /**
|
1323 | * Adds all the elements of an array into a string, separated by the specified separator string.
|
1324 | * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.
|
1325 | */
|
1326 | join(separator?: string): string;
|
1327 | /**
|
1328 | * Reverses the elements in an array in place.
|
1329 | * This method mutates the array and returns a reference to the same array.
|
1330 | */
|
1331 | reverse(): T[];
|
1332 | /**
|
1333 | * Removes the first element from an array and returns it.
|
1334 | * If the array is empty, undefined is returned and the array is not modified.
|
1335 | */
|
1336 | shift(): T | undefined;
|
1337 | /**
|
1338 | * Returns a copy of a section of an array.
|
1339 | * For both start and end, a negative index can be used to indicate an offset from the end of the array.
|
1340 | * For example, -2 refers to the second to last element of the array.
|
1341 | * @param start The beginning index of the specified portion of the array.
|
1342 | * If start is undefined, then the slice begins at index 0.
|
1343 | * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
1344 | * If end is undefined, then the slice extends to the end of the array.
|
1345 | */
|
1346 | slice(start?: number, end?: number): T[];
|
1347 | /**
|
1348 | * Sorts an array in place.
|
1349 | * This method mutates the array and returns a reference to the same array.
|
1350 | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
1351 | * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
1352 | * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
1353 | * ```ts
|
1354 | * [11,2,22,1].sort((a, b) => a - b)
|
1355 | * ```
|
1356 | */
|
1357 | sort(compareFn?: (a: T, b: T) => number): this;
|
1358 | /**
|
1359 | * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
1360 | * @param start The zero-based location in the array from which to start removing elements.
|
1361 | * @param deleteCount The number of elements to remove.
|
1362 | * @returns An array containing the elements that were deleted.
|
1363 | */
|
1364 | splice(start: number, deleteCount?: number): T[];
|
1365 | /**
|
1366 | * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
1367 | * @param start The zero-based location in the array from which to start removing elements.
|
1368 | * @param deleteCount The number of elements to remove.
|
1369 | * @param items Elements to insert into the array in place of the deleted elements.
|
1370 | * @returns An array containing the elements that were deleted.
|
1371 | */
|
1372 | splice(start: number, deleteCount: number, ...items: T[]): T[];
|
1373 | /**
|
1374 | * Inserts new elements at the start of an array, and returns the new length of the array.
|
1375 | * @param items Elements to insert at the start of the array.
|
1376 | */
|
1377 | unshift(...items: T[]): number;
|
1378 | /**
|
1379 | * Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
|
1380 | * @param searchElement The value to locate in the array.
|
1381 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
|
1382 | */
|
1383 | indexOf(searchElement: T, fromIndex?: number): number;
|
1384 | /**
|
1385 | * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.
|
1386 | * @param searchElement The value to locate in the array.
|
1387 | * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.
|
1388 | */
|
1389 | lastIndexOf(searchElement: T, fromIndex?: number): number;
|
1390 | /**
|
1391 | * Determines whether all the members of an array satisfy the specified test.
|
1392 | * @param predicate A function that accepts up to three arguments. The every method calls
|
1393 | * the predicate function for each element in the array until the predicate returns a value
|
1394 | * which is coercible to the Boolean value false, or until the end of the array.
|
1395 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
1396 | * If thisArg is omitted, undefined is used as the this value.
|
1397 | */
|
1398 | every<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[];
|
1399 | /**
|
1400 | * Determines whether all the members of an array satisfy the specified test.
|
1401 | * @param predicate A function that accepts up to three arguments. The every method calls
|
1402 | * the predicate function for each element in the array until the predicate returns a value
|
1403 | * which is coercible to the Boolean value false, or until the end of the array.
|
1404 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
1405 | * If thisArg is omitted, undefined is used as the this value.
|
1406 | */
|
1407 | every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean;
|
1408 | /**
|
1409 | * Determines whether the specified callback function returns true for any element of an array.
|
1410 | * @param predicate A function that accepts up to three arguments. The some method calls
|
1411 | * the predicate function for each element in the array until the predicate returns a value
|
1412 | * which is coercible to the Boolean value true, or until the end of the array.
|
1413 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
1414 | * If thisArg is omitted, undefined is used as the this value.
|
1415 | */
|
1416 | some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean;
|
1417 | /**
|
1418 | * Performs the specified action for each element in an array.
|
1419 | * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
|
1420 | * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
1421 | */
|
1422 | forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
|
1423 | /**
|
1424 | * Calls a defined callback function on each element of an array, and returns an array that contains the results.
|
1425 | * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
1426 | * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
1427 | */
|
1428 | map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
|
1429 | /**
|
1430 | * Returns the elements of an array that meet the condition specified in a callback function.
|
1431 | * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
|
1432 | * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
1433 | */
|
1434 | filter<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[];
|
1435 | /**
|
1436 | * Returns the elements of an array that meet the condition specified in a callback function.
|
1437 | * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
|
1438 | * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
1439 | */
|
1440 | filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[];
|
1441 | /**
|
1442 | * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
1443 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
1444 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
1445 | */
|
1446 | reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T;
|
1447 | reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T;
|
1448 | /**
|
1449 | * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
1450 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
1451 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
1452 | */
|
1453 | reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
|
1454 | /**
|
1455 | * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
1456 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
1457 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
1458 | */
|
1459 | reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T;
|
1460 | reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T;
|
1461 | /**
|
1462 | * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
1463 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
1464 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
1465 | */
|
1466 | reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
|
1467 |
|
1468 | [n: number]: T;
|
1469 | }
|
1470 |
|
1471 | interface ArrayConstructor {
|
1472 | new(arrayLength?: number): any[];
|
1473 | new <T>(arrayLength: number): T[];
|
1474 | new <T>(...items: T[]): T[];
|
1475 | (arrayLength?: number): any[];
|
1476 | <T>(arrayLength: number): T[];
|
1477 | <T>(...items: T[]): T[];
|
1478 | isArray(arg: any): arg is any[];
|
1479 | readonly prototype: any[];
|
1480 | }
|
1481 |
|
1482 | declare var Array: ArrayConstructor;
|
1483 |
|
1484 | interface TypedPropertyDescriptor<T> {
|
1485 | enumerable?: boolean;
|
1486 | configurable?: boolean;
|
1487 | writable?: boolean;
|
1488 | value?: T;
|
1489 | get?: () => T;
|
1490 | set?: (value: T) => void;
|
1491 | }
|
1492 |
|
1493 | declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
|
1494 | declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
|
1495 | declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
1496 | declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
|
1497 |
|
1498 | declare type PromiseConstructorLike = new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
|
1499 |
|
1500 | interface PromiseLike<T> {
|
1501 | |
1502 |
|
1503 |
|
1504 |
|
1505 |
|
1506 |
|
1507 | then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
|
1508 | }
|
1509 |
|
1510 | /**
|
1511 | * Represents the completion of an asynchronous operation
|
1512 | */
|
1513 | interface Promise<T> {
|
1514 | /**
|
1515 | * Attaches callbacks for the resolution and/or rejection of the Promise.
|
1516 | * @param onfulfilled The callback to execute when the Promise is resolved.
|
1517 | * @param onrejected The callback to execute when the Promise is rejected.
|
1518 | * @returns A Promise for the completion of which ever callback is executed.
|
1519 | */
|
1520 | then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
1521 |
|
1522 | /**
|
1523 | * Attaches a callback for only the rejection of the Promise.
|
1524 | * @param onrejected The callback to execute when the Promise is rejected.
|
1525 | * @returns A Promise for the completion of the callback.
|
1526 | */
|
1527 | catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
1528 | }
|
1529 |
|
1530 | /**
|
1531 | * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`.
|
1532 | */
|
1533 | type Awaited<T> =
|
1534 | T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
|
1535 | T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
|
1536 | F extends ((value: infer V, ...args: any) => any) ? // if the argument to `then` is callable, extracts the first argument
|
1537 | Awaited<V> : // recursively unwrap the value
|
1538 | never : // the argument to `then` was not callable
|
1539 | T; // non-object or non-thenable
|
1540 |
|
1541 | interface ArrayLike<T> {
|
1542 | readonly length: number;
|
1543 | readonly [n: number]: T;
|
1544 | }
|
1545 |
|
1546 | /**
|
1547 | * Make all properties in T optional
|
1548 | */
|
1549 | type Partial<T> = {
|
1550 | [P in keyof T]?: T[P];
|
1551 | };
|
1552 |
|
1553 | /**
|
1554 | * Make all properties in T required
|
1555 | */
|
1556 | type Required<T> = {
|
1557 | [P in keyof T]-?: T[P];
|
1558 | };
|
1559 |
|
1560 | /**
|
1561 | * Make all properties in T readonly
|
1562 | */
|
1563 | type Readonly<T> = {
|
1564 | readonly [P in keyof T]: T[P];
|
1565 | };
|
1566 |
|
1567 | /**
|
1568 | * From T, pick a set of properties whose keys are in the union K
|
1569 | */
|
1570 | type Pick<T, K extends keyof T> = {
|
1571 | [P in K]: T[P];
|
1572 | };
|
1573 |
|
1574 | /**
|
1575 | * Construct a type with a set of properties K of type T
|
1576 | */
|
1577 | type Record<K extends keyof any, T> = {
|
1578 | [P in K]: T;
|
1579 | };
|
1580 |
|
1581 | /**
|
1582 | * Exclude from T those types that are assignable to U
|
1583 | */
|
1584 | type Exclude<T, U> = T extends U ? never : T;
|
1585 |
|
1586 | /**
|
1587 | * Extract from T those types that are assignable to U
|
1588 | */
|
1589 | type Extract<T, U> = T extends U ? T : never;
|
1590 |
|
1591 | /**
|
1592 | * Construct a type with the properties of T except for those in type K.
|
1593 | */
|
1594 | type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
|
1595 |
|
1596 | /**
|
1597 | * Exclude null and undefined from T
|
1598 | */
|
1599 | type NonNullable<T> = T & {};
|
1600 |
|
1601 | /**
|
1602 | * Obtain the parameters of a function type in a tuple
|
1603 | */
|
1604 | type Parameters<T extends (...args: any) => any> = T extends (...args: infer P) => any ? P : never;
|
1605 |
|
1606 |
|
1607 |
|
1608 |
|
1609 | type ConstructorParameters<T extends abstract new (...args: any) => any> = T extends abstract new (...args: infer P) => any ? P : never;
|
1610 |
|
1611 |
|
1612 |
|
1613 |
|
1614 | type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? R : any;
|
1615 |
|
1616 |
|
1617 |
|
1618 |
|
1619 | type InstanceType<T extends abstract new (...args: any) => any> = T extends abstract new (...args: any) => infer R ? R : any;
|
1620 |
|
1621 |
|
1622 |
|
1623 |
|
1624 | type Uppercase<S extends string> = intrinsic;
|
1625 |
|
1626 |
|
1627 |
|
1628 |
|
1629 | type Lowercase<S extends string> = intrinsic;
|
1630 |
|
1631 |
|
1632 |
|
1633 |
|
1634 | type Capitalize<S extends string> = intrinsic;
|
1635 |
|
1636 |
|
1637 |
|
1638 |
|
1639 | type Uncapitalize<S extends string> = intrinsic;
|
1640 |
|
1641 |
|
1642 |
|
1643 |
|
1644 | interface ThisType<T> { }
|
1645 |
|
1646 |
|
1647 |
|
1648 |
|
1649 |
|
1650 |
|
1651 |
|
1652 | interface ArrayBuffer {
|
1653 | |
1654 |
|
1655 |
|
1656 | readonly byteLength: number;
|
1657 |
|
1658 | |
1659 |
|
1660 |
|
1661 | slice(begin: number, end?: number): ArrayBuffer;
|
1662 | }
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 | interface ArrayBufferTypes {
|
1668 | ArrayBuffer: ArrayBuffer;
|
1669 | }
|
1670 | type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes];
|
1671 |
|
1672 | interface ArrayBufferConstructor {
|
1673 | readonly prototype: ArrayBuffer;
|
1674 | new(byteLength: number): ArrayBuffer;
|
1675 | isView(arg: any): arg is ArrayBufferView;
|
1676 | }
|
1677 | declare var ArrayBuffer: ArrayBufferConstructor;
|
1678 |
|
1679 | interface ArrayBufferView {
|
1680 | |
1681 |
|
1682 |
|
1683 | buffer: ArrayBufferLike;
|
1684 |
|
1685 | |
1686 |
|
1687 |
|
1688 | byteLength: number;
|
1689 |
|
1690 | |
1691 |
|
1692 |
|
1693 | byteOffset: number;
|
1694 | }
|
1695 |
|
1696 | interface DataView {
|
1697 | readonly buffer: ArrayBuffer;
|
1698 | readonly byteLength: number;
|
1699 | readonly byteOffset: number;
|
1700 | |
1701 |
|
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 | getFloat32(byteOffset: number, littleEndian?: boolean): number;
|
1707 |
|
1708 | |
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 | getFloat64(byteOffset: number, littleEndian?: boolean): number;
|
1715 |
|
1716 | |
1717 |
|
1718 |
|
1719 |
|
1720 |
|
1721 | getInt8(byteOffset: number): number;
|
1722 |
|
1723 | |
1724 |
|
1725 |
|
1726 |
|
1727 |
|
1728 |
|
1729 | getInt16(byteOffset: number, littleEndian?: boolean): number;
|
1730 | |
1731 |
|
1732 |
|
1733 |
|
1734 |
|
1735 |
|
1736 | getInt32(byteOffset: number, littleEndian?: boolean): number;
|
1737 |
|
1738 | |
1739 |
|
1740 |
|
1741 |
|
1742 |
|
1743 | getUint8(byteOffset: number): number;
|
1744 |
|
1745 | |
1746 |
|
1747 |
|
1748 |
|
1749 |
|
1750 |
|
1751 | getUint16(byteOffset: number, littleEndian?: boolean): number;
|
1752 |
|
1753 | |
1754 |
|
1755 |
|
1756 |
|
1757 |
|
1758 |
|
1759 | getUint32(byteOffset: number, littleEndian?: boolean): number;
|
1760 |
|
1761 | |
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 |
|
1767 | setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
|
1768 |
|
1769 | |
1770 |
|
1771 |
|
1772 |
|
1773 |
|
1774 |
|
1775 | setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
|
1776 |
|
1777 | |
1778 |
|
1779 |
|
1780 |
|
1781 |
|
1782 | setInt8(byteOffset: number, value: number): void;
|
1783 |
|
1784 | |
1785 |
|
1786 |
|
1787 |
|
1788 |
|
1789 |
|
1790 | setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
|
1791 |
|
1792 | |
1793 |
|
1794 |
|
1795 |
|
1796 |
|
1797 |
|
1798 | setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
|
1799 |
|
1800 | |
1801 |
|
1802 |
|
1803 |
|
1804 |
|
1805 | setUint8(byteOffset: number, value: number): void;
|
1806 |
|
1807 | |
1808 |
|
1809 |
|
1810 |
|
1811 |
|
1812 |
|
1813 | setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
|
1814 |
|
1815 | |
1816 |
|
1817 |
|
1818 |
|
1819 |
|
1820 |
|
1821 | setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
|
1822 | }
|
1823 |
|
1824 | interface DataViewConstructor {
|
1825 | readonly prototype: DataView;
|
1826 | new(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView;
|
1827 | }
|
1828 | declare var DataView: DataViewConstructor;
|
1829 |
|
1830 |
|
1831 |
|
1832 |
|
1833 |
|
1834 | interface Int8Array {
|
1835 | |
1836 |
|
1837 |
|
1838 | readonly BYTES_PER_ELEMENT: number;
|
1839 |
|
1840 | |
1841 |
|
1842 |
|
1843 | readonly buffer: ArrayBufferLike;
|
1844 |
|
1845 | |
1846 |
|
1847 |
|
1848 | readonly byteLength: number;
|
1849 |
|
1850 | |
1851 |
|
1852 |
|
1853 | readonly byteOffset: number;
|
1854 |
|
1855 | |
1856 |
|
1857 |
|
1858 |
|
1859 |
|
1860 |
|
1861 |
|
1862 |
|
1863 |
|
1864 | copyWithin(target: number, start: number, end?: number): this;
|
1865 |
|
1866 | |
1867 |
|
1868 |
|
1869 |
|
1870 |
|
1871 |
|
1872 |
|
1873 |
|
1874 | every(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
|
1875 |
|
1876 | |
1877 |
|
1878 |
|
1879 |
|
1880 |
|
1881 |
|
1882 |
|
1883 |
|
1884 | fill(value: number, start?: number, end?: number): this;
|
1885 |
|
1886 | |
1887 |
|
1888 |
|
1889 |
|
1890 |
|
1891 |
|
1892 |
|
1893 | filter(predicate: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;
|
1894 |
|
1895 | |
1896 |
|
1897 |
|
1898 |
|
1899 |
|
1900 |
|
1901 |
|
1902 |
|
1903 |
|
1904 | find(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined;
|
1905 |
|
1906 | |
1907 |
|
1908 |
|
1909 |
|
1910 |
|
1911 |
|
1912 |
|
1913 |
|
1914 |
|
1915 | findIndex(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number;
|
1916 |
|
1917 | |
1918 |
|
1919 |
|
1920 |
|
1921 |
|
1922 |
|
1923 |
|
1924 | forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
|
1925 |
|
1926 | |
1927 |
|
1928 |
|
1929 |
|
1930 |
|
1931 |
|
1932 | indexOf(searchElement: number, fromIndex?: number): number;
|
1933 |
|
1934 | |
1935 |
|
1936 |
|
1937 |
|
1938 |
|
1939 | join(separator?: string): string;
|
1940 |
|
1941 | |
1942 |
|
1943 |
|
1944 |
|
1945 |
|
1946 |
|
1947 | lastIndexOf(searchElement: number, fromIndex?: number): number;
|
1948 |
|
1949 | |
1950 |
|
1951 |
|
1952 | readonly length: number;
|
1953 |
|
1954 | |
1955 |
|
1956 |
|
1957 |
|
1958 |
|
1959 |
|
1960 |
|
1961 |
|
1962 | map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
|
1963 |
|
1964 | |
1965 |
|
1966 |
|
1967 |
|
1968 |
|
1969 |
|
1970 |
|
1971 |
|
1972 |
|
1973 |
|
1974 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
|
1975 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
|
1976 |
|
1977 | |
1978 |
|
1979 |
|
1980 |
|
1981 |
|
1982 |
|
1983 |
|
1984 |
|
1985 |
|
1986 |
|
1987 | reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
|
1988 |
|
1989 | /**
|
1990 | * Calls the specified callback function for all the elements in an array, in descending order.
|
1991 | * The return value of the callback function is the accumulated result, and is provided as an
|
1992 | * argument in the next call to the callback function.
|
1993 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
1994 | * the callbackfn function one time for each element in the array.
|
1995 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
1996 | * the accumulation. The first call to the callbackfn function provides this value as an
|
1997 | * argument instead of an array value.
|
1998 | */
|
1999 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
|
2000 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
|
2001 |
|
2002 | /**
|
2003 | * Calls the specified callback function for all the elements in an array, in descending order.
|
2004 | * The return value of the callback function is the accumulated result, and is provided as an
|
2005 | * argument in the next call to the callback function.
|
2006 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
2007 | * the callbackfn function one time for each element in the array.
|
2008 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2009 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
2010 | * instead of an array value.
|
2011 | */
|
2012 | reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
|
2013 |
|
2014 | /**
|
2015 | * Reverses the elements in an Array.
|
2016 | */
|
2017 | reverse(): Int8Array;
|
2018 |
|
2019 | /**
|
2020 | * Sets a value or an array of values.
|
2021 | * @param array A typed or untyped array of values to set.
|
2022 | * @param offset The index in the current array at which the values are to be written.
|
2023 | */
|
2024 | set(array: ArrayLike<number>, offset?: number): void;
|
2025 |
|
2026 | /**
|
2027 | * Returns a section of an array.
|
2028 | * @param start The beginning of the specified portion of the array.
|
2029 | * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
2030 | */
|
2031 | slice(start?: number, end?: number): Int8Array;
|
2032 |
|
2033 | /**
|
2034 | * Determines whether the specified callback function returns true for any element of an array.
|
2035 | * @param predicate A function that accepts up to three arguments. The some method calls
|
2036 | * the predicate function for each element in the array until the predicate returns a value
|
2037 | * which is coercible to the Boolean value true, or until the end of the array.
|
2038 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
2039 | * If thisArg is omitted, undefined is used as the this value.
|
2040 | */
|
2041 | some(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
|
2042 |
|
2043 | /**
|
2044 | * Sorts an array.
|
2045 | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
2046 | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
2047 | * value otherwise. If omitted, the elements are sorted in ascending order.
|
2048 | * ```ts
|
2049 | * [11,2,22,1].sort((a, b) => a - b)
|
2050 | * ```
|
2051 | */
|
2052 | sort(compareFn?: (a: number, b: number) => number): this;
|
2053 |
|
2054 | /**
|
2055 | * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
|
2056 | * at begin, inclusive, up to end, exclusive.
|
2057 | * @param begin The index of the beginning of the array.
|
2058 | * @param end The index of the end of the array.
|
2059 | */
|
2060 | subarray(begin?: number, end?: number): Int8Array;
|
2061 |
|
2062 | /**
|
2063 | * Converts a number to a string by using the current locale.
|
2064 | */
|
2065 | toLocaleString(): string;
|
2066 |
|
2067 | /**
|
2068 | * Returns a string representation of an array.
|
2069 | */
|
2070 | toString(): string;
|
2071 |
|
2072 | /** Returns the primitive value of the specified object. */
|
2073 | valueOf(): Int8Array;
|
2074 |
|
2075 | [index: number]: number;
|
2076 | }
|
2077 | interface Int8ArrayConstructor {
|
2078 | readonly prototype: Int8Array;
|
2079 | new(length: number): Int8Array;
|
2080 | new(array: ArrayLike<number> | ArrayBufferLike): Int8Array;
|
2081 | new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array;
|
2082 |
|
2083 | /**
|
2084 | * The size in bytes of each element in the array.
|
2085 | */
|
2086 | readonly BYTES_PER_ELEMENT: number;
|
2087 |
|
2088 | /**
|
2089 | * Returns a new array from a set of elements.
|
2090 | * @param items A set of elements to include in the new array object.
|
2091 | */
|
2092 | of(...items: number[]): Int8Array;
|
2093 |
|
2094 | /**
|
2095 | * Creates an array from an array-like or iterable object.
|
2096 | * @param arrayLike An array-like or iterable object to convert to an array.
|
2097 | */
|
2098 | from(arrayLike: ArrayLike<number>): Int8Array;
|
2099 |
|
2100 | /**
|
2101 | * Creates an array from an array-like or iterable object.
|
2102 | * @param arrayLike An array-like or iterable object to convert to an array.
|
2103 | * @param mapfn A mapping function to call on every element of the array.
|
2104 | * @param thisArg Value of 'this' used to invoke the mapfn.
|
2105 | */
|
2106 | from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array;
|
2107 |
|
2108 |
|
2109 | }
|
2110 | declare var Int8Array: Int8ArrayConstructor;
|
2111 |
|
2112 | /**
|
2113 | * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
|
2114 | * requested number of bytes could not be allocated an exception is raised.
|
2115 | */
|
2116 | interface Uint8Array {
|
2117 | /**
|
2118 | * The size in bytes of each element in the array.
|
2119 | */
|
2120 | readonly BYTES_PER_ELEMENT: number;
|
2121 |
|
2122 | /**
|
2123 | * The ArrayBuffer instance referenced by the array.
|
2124 | */
|
2125 | readonly buffer: ArrayBufferLike;
|
2126 |
|
2127 | /**
|
2128 | * The length in bytes of the array.
|
2129 | */
|
2130 | readonly byteLength: number;
|
2131 |
|
2132 | /**
|
2133 | * The offset in bytes of the array.
|
2134 | */
|
2135 | readonly byteOffset: number;
|
2136 |
|
2137 | /**
|
2138 | * Returns the this object after copying a section of the array identified by start and end
|
2139 | * to the same array starting at position target
|
2140 | * @param target If target is negative, it is treated as length+target where length is the
|
2141 | * length of the array.
|
2142 | * @param start If start is negative, it is treated as length+start. If end is negative, it
|
2143 | * is treated as length+end.
|
2144 | * @param end If not specified, length of the this object is used as its default value.
|
2145 | */
|
2146 | copyWithin(target: number, start: number, end?: number): this;
|
2147 |
|
2148 | /**
|
2149 | * Determines whether all the members of an array satisfy the specified test.
|
2150 | * @param predicate A function that accepts up to three arguments. The every method calls
|
2151 | * the predicate function for each element in the array until the predicate returns a value
|
2152 | * which is coercible to the Boolean value false, or until the end of the array.
|
2153 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
2154 | * If thisArg is omitted, undefined is used as the this value.
|
2155 | */
|
2156 | every(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
|
2157 |
|
2158 | /**
|
2159 | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
2160 | * @param value value to fill array section with
|
2161 | * @param start index to start filling the array at. If start is negative, it is treated as
|
2162 | * length+start where length is the length of the array.
|
2163 | * @param end index to stop filling the array at. If end is negative, it is treated as
|
2164 | * length+end.
|
2165 | */
|
2166 | fill(value: number, start?: number, end?: number): this;
|
2167 |
|
2168 | /**
|
2169 | * Returns the elements of an array that meet the condition specified in a callback function.
|
2170 | * @param predicate A function that accepts up to three arguments. The filter method calls
|
2171 | * the predicate function one time for each element in the array.
|
2172 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
2173 | * If thisArg is omitted, undefined is used as the this value.
|
2174 | */
|
2175 | filter(predicate: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;
|
2176 |
|
2177 | /**
|
2178 | * Returns the value of the first element in the array where predicate is true, and undefined
|
2179 | * otherwise.
|
2180 | * @param predicate find calls predicate once for each element of the array, in ascending
|
2181 | * order, until it finds one where predicate returns true. If such an element is found, find
|
2182 | * immediately returns that element value. Otherwise, find returns undefined.
|
2183 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
2184 | * predicate. If it is not provided, undefined is used instead.
|
2185 | */
|
2186 | find(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined;
|
2187 |
|
2188 | /**
|
2189 | * Returns the index of the first element in the array where predicate is true, and -1
|
2190 | * otherwise.
|
2191 | * @param predicate find calls predicate once for each element of the array, in ascending
|
2192 | * order, until it finds one where predicate returns true. If such an element is found,
|
2193 | * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
|
2194 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
2195 | * predicate. If it is not provided, undefined is used instead.
|
2196 | */
|
2197 | findIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number;
|
2198 |
|
2199 | /**
|
2200 | * Performs the specified action for each element in an array.
|
2201 | * @param callbackfn A function that accepts up to three arguments. forEach calls the
|
2202 | * callbackfn function one time for each element in the array.
|
2203 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
2204 | * If thisArg is omitted, undefined is used as the this value.
|
2205 | */
|
2206 | forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
|
2207 |
|
2208 | /**
|
2209 | * Returns the index of the first occurrence of a value in an array.
|
2210 | * @param searchElement The value to locate in the array.
|
2211 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
2212 | * search starts at index 0.
|
2213 | */
|
2214 | indexOf(searchElement: number, fromIndex?: number): number;
|
2215 |
|
2216 | /**
|
2217 | * Adds all the elements of an array separated by the specified separator string.
|
2218 | * @param separator A string used to separate one element of an array from the next in the
|
2219 | * resulting String. If omitted, the array elements are separated with a comma.
|
2220 | */
|
2221 | join(separator?: string): string;
|
2222 |
|
2223 | /**
|
2224 | * Returns the index of the last occurrence of a value in an array.
|
2225 | * @param searchElement The value to locate in the array.
|
2226 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
2227 | * search starts at index 0.
|
2228 | */
|
2229 | lastIndexOf(searchElement: number, fromIndex?: number): number;
|
2230 |
|
2231 | /**
|
2232 | * The length of the array.
|
2233 | */
|
2234 | readonly length: number;
|
2235 |
|
2236 | /**
|
2237 | * Calls a defined callback function on each element of an array, and returns an array that
|
2238 | * contains the results.
|
2239 | * @param callbackfn A function that accepts up to three arguments. The map method calls the
|
2240 | * callbackfn function one time for each element in the array.
|
2241 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
2242 | * If thisArg is omitted, undefined is used as the this value.
|
2243 | */
|
2244 | map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
|
2245 |
|
2246 | /**
|
2247 | * Calls the specified callback function for all the elements in an array. The return value of
|
2248 | * the callback function is the accumulated result, and is provided as an argument in the next
|
2249 | * call to the callback function.
|
2250 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
2251 | * callbackfn function one time for each element in the array.
|
2252 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2253 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
2254 | * instead of an array value.
|
2255 | */
|
2256 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
|
2257 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
|
2258 |
|
2259 | /**
|
2260 | * Calls the specified callback function for all the elements in an array. The return value of
|
2261 | * the callback function is the accumulated result, and is provided as an argument in the next
|
2262 | * call to the callback function.
|
2263 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
2264 | * callbackfn function one time for each element in the array.
|
2265 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2266 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
2267 | * instead of an array value.
|
2268 | */
|
2269 | reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
|
2270 |
|
2271 | /**
|
2272 | * Calls the specified callback function for all the elements in an array, in descending order.
|
2273 | * The return value of the callback function is the accumulated result, and is provided as an
|
2274 | * argument in the next call to the callback function.
|
2275 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
2276 | * the callbackfn function one time for each element in the array.
|
2277 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2278 | * the accumulation. The first call to the callbackfn function provides this value as an
|
2279 | * argument instead of an array value.
|
2280 | */
|
2281 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
|
2282 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
|
2283 |
|
2284 | /**
|
2285 | * Calls the specified callback function for all the elements in an array, in descending order.
|
2286 | * The return value of the callback function is the accumulated result, and is provided as an
|
2287 | * argument in the next call to the callback function.
|
2288 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
2289 | * the callbackfn function one time for each element in the array.
|
2290 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2291 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
2292 | * instead of an array value.
|
2293 | */
|
2294 | reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
|
2295 |
|
2296 | /**
|
2297 | * Reverses the elements in an Array.
|
2298 | */
|
2299 | reverse(): Uint8Array;
|
2300 |
|
2301 | /**
|
2302 | * Sets a value or an array of values.
|
2303 | * @param array A typed or untyped array of values to set.
|
2304 | * @param offset The index in the current array at which the values are to be written.
|
2305 | */
|
2306 | set(array: ArrayLike<number>, offset?: number): void;
|
2307 |
|
2308 | /**
|
2309 | * Returns a section of an array.
|
2310 | * @param start The beginning of the specified portion of the array.
|
2311 | * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
2312 | */
|
2313 | slice(start?: number, end?: number): Uint8Array;
|
2314 |
|
2315 | /**
|
2316 | * Determines whether the specified callback function returns true for any element of an array.
|
2317 | * @param predicate A function that accepts up to three arguments. The some method calls
|
2318 | * the predicate function for each element in the array until the predicate returns a value
|
2319 | * which is coercible to the Boolean value true, or until the end of the array.
|
2320 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
2321 | * If thisArg is omitted, undefined is used as the this value.
|
2322 | */
|
2323 | some(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
|
2324 |
|
2325 | /**
|
2326 | * Sorts an array.
|
2327 | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
2328 | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
2329 | * value otherwise. If omitted, the elements are sorted in ascending order.
|
2330 | * ```ts
|
2331 | * [11,2,22,1].sort((a, b) => a - b)
|
2332 | * ```
|
2333 | */
|
2334 | sort(compareFn?: (a: number, b: number) => number): this;
|
2335 |
|
2336 | /**
|
2337 | * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
|
2338 | * at begin, inclusive, up to end, exclusive.
|
2339 | * @param begin The index of the beginning of the array.
|
2340 | * @param end The index of the end of the array.
|
2341 | */
|
2342 | subarray(begin?: number, end?: number): Uint8Array;
|
2343 |
|
2344 | /**
|
2345 | * Converts a number to a string by using the current locale.
|
2346 | */
|
2347 | toLocaleString(): string;
|
2348 |
|
2349 | /**
|
2350 | * Returns a string representation of an array.
|
2351 | */
|
2352 | toString(): string;
|
2353 |
|
2354 | /** Returns the primitive value of the specified object. */
|
2355 | valueOf(): Uint8Array;
|
2356 |
|
2357 | [index: number]: number;
|
2358 | }
|
2359 |
|
2360 | interface Uint8ArrayConstructor {
|
2361 | readonly prototype: Uint8Array;
|
2362 | new(length: number): Uint8Array;
|
2363 | new(array: ArrayLike<number> | ArrayBufferLike): Uint8Array;
|
2364 | new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array;
|
2365 |
|
2366 | /**
|
2367 | * The size in bytes of each element in the array.
|
2368 | */
|
2369 | readonly BYTES_PER_ELEMENT: number;
|
2370 |
|
2371 | /**
|
2372 | * Returns a new array from a set of elements.
|
2373 | * @param items A set of elements to include in the new array object.
|
2374 | */
|
2375 | of(...items: number[]): Uint8Array;
|
2376 |
|
2377 | /**
|
2378 | * Creates an array from an array-like or iterable object.
|
2379 | * @param arrayLike An array-like or iterable object to convert to an array.
|
2380 | */
|
2381 | from(arrayLike: ArrayLike<number>): Uint8Array;
|
2382 |
|
2383 | /**
|
2384 | * Creates an array from an array-like or iterable object.
|
2385 | * @param arrayLike An array-like or iterable object to convert to an array.
|
2386 | * @param mapfn A mapping function to call on every element of the array.
|
2387 | * @param thisArg Value of 'this' used to invoke the mapfn.
|
2388 | */
|
2389 | from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array;
|
2390 |
|
2391 | }
|
2392 | declare var Uint8Array: Uint8ArrayConstructor;
|
2393 |
|
2394 | /**
|
2395 | * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
|
2396 | * If the requested number of bytes could not be allocated an exception is raised.
|
2397 | */
|
2398 | interface Uint8ClampedArray {
|
2399 | /**
|
2400 | * The size in bytes of each element in the array.
|
2401 | */
|
2402 | readonly BYTES_PER_ELEMENT: number;
|
2403 |
|
2404 | /**
|
2405 | * The ArrayBuffer instance referenced by the array.
|
2406 | */
|
2407 | readonly buffer: ArrayBufferLike;
|
2408 |
|
2409 | /**
|
2410 | * The length in bytes of the array.
|
2411 | */
|
2412 | readonly byteLength: number;
|
2413 |
|
2414 | /**
|
2415 | * The offset in bytes of the array.
|
2416 | */
|
2417 | readonly byteOffset: number;
|
2418 |
|
2419 | /**
|
2420 | * Returns the this object after copying a section of the array identified by start and end
|
2421 | * to the same array starting at position target
|
2422 | * @param target If target is negative, it is treated as length+target where length is the
|
2423 | * length of the array.
|
2424 | * @param start If start is negative, it is treated as length+start. If end is negative, it
|
2425 | * is treated as length+end.
|
2426 | * @param end If not specified, length of the this object is used as its default value.
|
2427 | */
|
2428 | copyWithin(target: number, start: number, end?: number): this;
|
2429 |
|
2430 | /**
|
2431 | * Determines whether all the members of an array satisfy the specified test.
|
2432 | * @param predicate A function that accepts up to three arguments. The every method calls
|
2433 | * the predicate function for each element in the array until the predicate returns a value
|
2434 | * which is coercible to the Boolean value false, or until the end of the array.
|
2435 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
2436 | * If thisArg is omitted, undefined is used as the this value.
|
2437 | */
|
2438 | every(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
|
2439 |
|
2440 | /**
|
2441 | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
2442 | * @param value value to fill array section with
|
2443 | * @param start index to start filling the array at. If start is negative, it is treated as
|
2444 | * length+start where length is the length of the array.
|
2445 | * @param end index to stop filling the array at. If end is negative, it is treated as
|
2446 | * length+end.
|
2447 | */
|
2448 | fill(value: number, start?: number, end?: number): this;
|
2449 |
|
2450 | /**
|
2451 | * Returns the elements of an array that meet the condition specified in a callback function.
|
2452 | * @param predicate A function that accepts up to three arguments. The filter method calls
|
2453 | * the predicate function one time for each element in the array.
|
2454 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
2455 | * If thisArg is omitted, undefined is used as the this value.
|
2456 | */
|
2457 | filter(predicate: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;
|
2458 |
|
2459 | /**
|
2460 | * Returns the value of the first element in the array where predicate is true, and undefined
|
2461 | * otherwise.
|
2462 | * @param predicate find calls predicate once for each element of the array, in ascending
|
2463 | * order, until it finds one where predicate returns true. If such an element is found, find
|
2464 | * immediately returns that element value. Otherwise, find returns undefined.
|
2465 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
2466 | * predicate. If it is not provided, undefined is used instead.
|
2467 | */
|
2468 | find(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined;
|
2469 |
|
2470 | /**
|
2471 | * Returns the index of the first element in the array where predicate is true, and -1
|
2472 | * otherwise.
|
2473 | * @param predicate find calls predicate once for each element of the array, in ascending
|
2474 | * order, until it finds one where predicate returns true. If such an element is found,
|
2475 | * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
|
2476 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
2477 | * predicate. If it is not provided, undefined is used instead.
|
2478 | */
|
2479 | findIndex(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number;
|
2480 |
|
2481 | /**
|
2482 | * Performs the specified action for each element in an array.
|
2483 | * @param callbackfn A function that accepts up to three arguments. forEach calls the
|
2484 | * callbackfn function one time for each element in the array.
|
2485 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
2486 | * If thisArg is omitted, undefined is used as the this value.
|
2487 | */
|
2488 | forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
|
2489 |
|
2490 | /**
|
2491 | * Returns the index of the first occurrence of a value in an array.
|
2492 | * @param searchElement The value to locate in the array.
|
2493 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
2494 | * search starts at index 0.
|
2495 | */
|
2496 | indexOf(searchElement: number, fromIndex?: number): number;
|
2497 |
|
2498 | /**
|
2499 | * Adds all the elements of an array separated by the specified separator string.
|
2500 | * @param separator A string used to separate one element of an array from the next in the
|
2501 | * resulting String. If omitted, the array elements are separated with a comma.
|
2502 | */
|
2503 | join(separator?: string): string;
|
2504 |
|
2505 | /**
|
2506 | * Returns the index of the last occurrence of a value in an array.
|
2507 | * @param searchElement The value to locate in the array.
|
2508 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
2509 | * search starts at index 0.
|
2510 | */
|
2511 | lastIndexOf(searchElement: number, fromIndex?: number): number;
|
2512 |
|
2513 | /**
|
2514 | * The length of the array.
|
2515 | */
|
2516 | readonly length: number;
|
2517 |
|
2518 | /**
|
2519 | * Calls a defined callback function on each element of an array, and returns an array that
|
2520 | * contains the results.
|
2521 | * @param callbackfn A function that accepts up to three arguments. The map method calls the
|
2522 | * callbackfn function one time for each element in the array.
|
2523 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
2524 | * If thisArg is omitted, undefined is used as the this value.
|
2525 | */
|
2526 | map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
|
2527 |
|
2528 | /**
|
2529 | * Calls the specified callback function for all the elements in an array. The return value of
|
2530 | * the callback function is the accumulated result, and is provided as an argument in the next
|
2531 | * call to the callback function.
|
2532 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
2533 | * callbackfn function one time for each element in the array.
|
2534 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2535 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
2536 | * instead of an array value.
|
2537 | */
|
2538 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
|
2539 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
|
2540 |
|
2541 | /**
|
2542 | * Calls the specified callback function for all the elements in an array. The return value of
|
2543 | * the callback function is the accumulated result, and is provided as an argument in the next
|
2544 | * call to the callback function.
|
2545 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
2546 | * callbackfn function one time for each element in the array.
|
2547 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2548 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
2549 | * instead of an array value.
|
2550 | */
|
2551 | reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
|
2552 |
|
2553 | /**
|
2554 | * Calls the specified callback function for all the elements in an array, in descending order.
|
2555 | * The return value of the callback function is the accumulated result, and is provided as an
|
2556 | * argument in the next call to the callback function.
|
2557 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
2558 | * the callbackfn function one time for each element in the array.
|
2559 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2560 | * the accumulation. The first call to the callbackfn function provides this value as an
|
2561 | * argument instead of an array value.
|
2562 | */
|
2563 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
|
2564 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
|
2565 |
|
2566 | /**
|
2567 | * Calls the specified callback function for all the elements in an array, in descending order.
|
2568 | * The return value of the callback function is the accumulated result, and is provided as an
|
2569 | * argument in the next call to the callback function.
|
2570 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
2571 | * the callbackfn function one time for each element in the array.
|
2572 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2573 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
2574 | * instead of an array value.
|
2575 | */
|
2576 | reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
|
2577 |
|
2578 | /**
|
2579 | * Reverses the elements in an Array.
|
2580 | */
|
2581 | reverse(): Uint8ClampedArray;
|
2582 |
|
2583 | /**
|
2584 | * Sets a value or an array of values.
|
2585 | * @param array A typed or untyped array of values to set.
|
2586 | * @param offset The index in the current array at which the values are to be written.
|
2587 | */
|
2588 | set(array: ArrayLike<number>, offset?: number): void;
|
2589 |
|
2590 | /**
|
2591 | * Returns a section of an array.
|
2592 | * @param start The beginning of the specified portion of the array.
|
2593 | * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
2594 | */
|
2595 | slice(start?: number, end?: number): Uint8ClampedArray;
|
2596 |
|
2597 | /**
|
2598 | * Determines whether the specified callback function returns true for any element of an array.
|
2599 | * @param predicate A function that accepts up to three arguments. The some method calls
|
2600 | * the predicate function for each element in the array until the predicate returns a value
|
2601 | * which is coercible to the Boolean value true, or until the end of the array.
|
2602 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
2603 | * If thisArg is omitted, undefined is used as the this value.
|
2604 | */
|
2605 | some(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
|
2606 |
|
2607 | /**
|
2608 | * Sorts an array.
|
2609 | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
2610 | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
2611 | * value otherwise. If omitted, the elements are sorted in ascending order.
|
2612 | * ```ts
|
2613 | * [11,2,22,1].sort((a, b) => a - b)
|
2614 | * ```
|
2615 | */
|
2616 | sort(compareFn?: (a: number, b: number) => number): this;
|
2617 |
|
2618 | /**
|
2619 | * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
|
2620 | * at begin, inclusive, up to end, exclusive.
|
2621 | * @param begin The index of the beginning of the array.
|
2622 | * @param end The index of the end of the array.
|
2623 | */
|
2624 | subarray(begin?: number, end?: number): Uint8ClampedArray;
|
2625 |
|
2626 | /**
|
2627 | * Converts a number to a string by using the current locale.
|
2628 | */
|
2629 | toLocaleString(): string;
|
2630 |
|
2631 | /**
|
2632 | * Returns a string representation of an array.
|
2633 | */
|
2634 | toString(): string;
|
2635 |
|
2636 | /** Returns the primitive value of the specified object. */
|
2637 | valueOf(): Uint8ClampedArray;
|
2638 |
|
2639 | [index: number]: number;
|
2640 | }
|
2641 |
|
2642 | interface Uint8ClampedArrayConstructor {
|
2643 | readonly prototype: Uint8ClampedArray;
|
2644 | new(length: number): Uint8ClampedArray;
|
2645 | new(array: ArrayLike<number> | ArrayBufferLike): Uint8ClampedArray;
|
2646 | new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray;
|
2647 |
|
2648 | /**
|
2649 | * The size in bytes of each element in the array.
|
2650 | */
|
2651 | readonly BYTES_PER_ELEMENT: number;
|
2652 |
|
2653 | /**
|
2654 | * Returns a new array from a set of elements.
|
2655 | * @param items A set of elements to include in the new array object.
|
2656 | */
|
2657 | of(...items: number[]): Uint8ClampedArray;
|
2658 |
|
2659 | /**
|
2660 | * Creates an array from an array-like or iterable object.
|
2661 | * @param arrayLike An array-like or iterable object to convert to an array.
|
2662 | */
|
2663 | from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
|
2664 |
|
2665 | /**
|
2666 | * Creates an array from an array-like or iterable object.
|
2667 | * @param arrayLike An array-like or iterable object to convert to an array.
|
2668 | * @param mapfn A mapping function to call on every element of the array.
|
2669 | * @param thisArg Value of 'this' used to invoke the mapfn.
|
2670 | */
|
2671 | from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray;
|
2672 | }
|
2673 | declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
|
2674 |
|
2675 | /**
|
2676 | * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
|
2677 | * requested number of bytes could not be allocated an exception is raised.
|
2678 | */
|
2679 | interface Int16Array {
|
2680 | /**
|
2681 | * The size in bytes of each element in the array.
|
2682 | */
|
2683 | readonly BYTES_PER_ELEMENT: number;
|
2684 |
|
2685 | /**
|
2686 | * The ArrayBuffer instance referenced by the array.
|
2687 | */
|
2688 | readonly buffer: ArrayBufferLike;
|
2689 |
|
2690 | /**
|
2691 | * The length in bytes of the array.
|
2692 | */
|
2693 | readonly byteLength: number;
|
2694 |
|
2695 | /**
|
2696 | * The offset in bytes of the array.
|
2697 | */
|
2698 | readonly byteOffset: number;
|
2699 |
|
2700 | /**
|
2701 | * Returns the this object after copying a section of the array identified by start and end
|
2702 | * to the same array starting at position target
|
2703 | * @param target If target is negative, it is treated as length+target where length is the
|
2704 | * length of the array.
|
2705 | * @param start If start is negative, it is treated as length+start. If end is negative, it
|
2706 | * is treated as length+end.
|
2707 | * @param end If not specified, length of the this object is used as its default value.
|
2708 | */
|
2709 | copyWithin(target: number, start: number, end?: number): this;
|
2710 |
|
2711 | /**
|
2712 | * Determines whether all the members of an array satisfy the specified test.
|
2713 | * @param predicate A function that accepts up to three arguments. The every method calls
|
2714 | * the predicate function for each element in the array until the predicate returns a value
|
2715 | * which is coercible to the Boolean value false, or until the end of the array.
|
2716 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
2717 | * If thisArg is omitted, undefined is used as the this value.
|
2718 | */
|
2719 | every(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
|
2720 |
|
2721 | /**
|
2722 | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
2723 | * @param value value to fill array section with
|
2724 | * @param start index to start filling the array at. If start is negative, it is treated as
|
2725 | * length+start where length is the length of the array.
|
2726 | * @param end index to stop filling the array at. If end is negative, it is treated as
|
2727 | * length+end.
|
2728 | */
|
2729 | fill(value: number, start?: number, end?: number): this;
|
2730 |
|
2731 | /**
|
2732 | * Returns the elements of an array that meet the condition specified in a callback function.
|
2733 | * @param predicate A function that accepts up to three arguments. The filter method calls
|
2734 | * the predicate function one time for each element in the array.
|
2735 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
2736 | * If thisArg is omitted, undefined is used as the this value.
|
2737 | */
|
2738 | filter(predicate: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;
|
2739 |
|
2740 | /**
|
2741 | * Returns the value of the first element in the array where predicate is true, and undefined
|
2742 | * otherwise.
|
2743 | * @param predicate find calls predicate once for each element of the array, in ascending
|
2744 | * order, until it finds one where predicate returns true. If such an element is found, find
|
2745 | * immediately returns that element value. Otherwise, find returns undefined.
|
2746 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
2747 | * predicate. If it is not provided, undefined is used instead.
|
2748 | */
|
2749 | find(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined;
|
2750 |
|
2751 | /**
|
2752 | * Returns the index of the first element in the array where predicate is true, and -1
|
2753 | * otherwise.
|
2754 | * @param predicate find calls predicate once for each element of the array, in ascending
|
2755 | * order, until it finds one where predicate returns true. If such an element is found,
|
2756 | * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
|
2757 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
2758 | * predicate. If it is not provided, undefined is used instead.
|
2759 | */
|
2760 | findIndex(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number;
|
2761 |
|
2762 | /**
|
2763 | * Performs the specified action for each element in an array.
|
2764 | * @param callbackfn A function that accepts up to three arguments. forEach calls the
|
2765 | * callbackfn function one time for each element in the array.
|
2766 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
2767 | * If thisArg is omitted, undefined is used as the this value.
|
2768 | */
|
2769 | forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
|
2770 | /**
|
2771 | * Returns the index of the first occurrence of a value in an array.
|
2772 | * @param searchElement The value to locate in the array.
|
2773 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
2774 | * search starts at index 0.
|
2775 | */
|
2776 | indexOf(searchElement: number, fromIndex?: number): number;
|
2777 |
|
2778 | /**
|
2779 | * Adds all the elements of an array separated by the specified separator string.
|
2780 | * @param separator A string used to separate one element of an array from the next in the
|
2781 | * resulting String. If omitted, the array elements are separated with a comma.
|
2782 | */
|
2783 | join(separator?: string): string;
|
2784 |
|
2785 | /**
|
2786 | * Returns the index of the last occurrence of a value in an array.
|
2787 | * @param searchElement The value to locate in the array.
|
2788 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
2789 | * search starts at index 0.
|
2790 | */
|
2791 | lastIndexOf(searchElement: number, fromIndex?: number): number;
|
2792 |
|
2793 | /**
|
2794 | * The length of the array.
|
2795 | */
|
2796 | readonly length: number;
|
2797 |
|
2798 | /**
|
2799 | * Calls a defined callback function on each element of an array, and returns an array that
|
2800 | * contains the results.
|
2801 | * @param callbackfn A function that accepts up to three arguments. The map method calls the
|
2802 | * callbackfn function one time for each element in the array.
|
2803 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
2804 | * If thisArg is omitted, undefined is used as the this value.
|
2805 | */
|
2806 | map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
|
2807 |
|
2808 | /**
|
2809 | * Calls the specified callback function for all the elements in an array. The return value of
|
2810 | * the callback function is the accumulated result, and is provided as an argument in the next
|
2811 | * call to the callback function.
|
2812 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
2813 | * callbackfn function one time for each element in the array.
|
2814 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2815 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
2816 | * instead of an array value.
|
2817 | */
|
2818 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
|
2819 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
|
2820 |
|
2821 | /**
|
2822 | * Calls the specified callback function for all the elements in an array. The return value of
|
2823 | * the callback function is the accumulated result, and is provided as an argument in the next
|
2824 | * call to the callback function.
|
2825 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
2826 | * callbackfn function one time for each element in the array.
|
2827 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2828 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
2829 | * instead of an array value.
|
2830 | */
|
2831 | reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
|
2832 |
|
2833 | /**
|
2834 | * Calls the specified callback function for all the elements in an array, in descending order.
|
2835 | * The return value of the callback function is the accumulated result, and is provided as an
|
2836 | * argument in the next call to the callback function.
|
2837 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
2838 | * the callbackfn function one time for each element in the array.
|
2839 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2840 | * the accumulation. The first call to the callbackfn function provides this value as an
|
2841 | * argument instead of an array value.
|
2842 | */
|
2843 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
|
2844 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
|
2845 |
|
2846 | /**
|
2847 | * Calls the specified callback function for all the elements in an array, in descending order.
|
2848 | * The return value of the callback function is the accumulated result, and is provided as an
|
2849 | * argument in the next call to the callback function.
|
2850 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
2851 | * the callbackfn function one time for each element in the array.
|
2852 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
2853 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
2854 | * instead of an array value.
|
2855 | */
|
2856 | reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
|
2857 |
|
2858 | /**
|
2859 | * Reverses the elements in an Array.
|
2860 | */
|
2861 | reverse(): Int16Array;
|
2862 |
|
2863 | /**
|
2864 | * Sets a value or an array of values.
|
2865 | * @param array A typed or untyped array of values to set.
|
2866 | * @param offset The index in the current array at which the values are to be written.
|
2867 | */
|
2868 | set(array: ArrayLike<number>, offset?: number): void;
|
2869 |
|
2870 | /**
|
2871 | * Returns a section of an array.
|
2872 | * @param start The beginning of the specified portion of the array.
|
2873 | * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
2874 | */
|
2875 | slice(start?: number, end?: number): Int16Array;
|
2876 |
|
2877 | /**
|
2878 | * Determines whether the specified callback function returns true for any element of an array.
|
2879 | * @param predicate A function that accepts up to three arguments. The some method calls
|
2880 | * the predicate function for each element in the array until the predicate returns a value
|
2881 | * which is coercible to the Boolean value true, or until the end of the array.
|
2882 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
2883 | * If thisArg is omitted, undefined is used as the this value.
|
2884 | */
|
2885 | some(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
|
2886 |
|
2887 | /**
|
2888 | * Sorts an array.
|
2889 | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
2890 | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
2891 | * value otherwise. If omitted, the elements are sorted in ascending order.
|
2892 | * ```ts
|
2893 | * [11,2,22,1].sort((a, b) => a - b)
|
2894 | * ```
|
2895 | */
|
2896 | sort(compareFn?: (a: number, b: number) => number): this;
|
2897 |
|
2898 | /**
|
2899 | * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
|
2900 | * at begin, inclusive, up to end, exclusive.
|
2901 | * @param begin The index of the beginning of the array.
|
2902 | * @param end The index of the end of the array.
|
2903 | */
|
2904 | subarray(begin?: number, end?: number): Int16Array;
|
2905 |
|
2906 | /**
|
2907 | * Converts a number to a string by using the current locale.
|
2908 | */
|
2909 | toLocaleString(): string;
|
2910 |
|
2911 | /**
|
2912 | * Returns a string representation of an array.
|
2913 | */
|
2914 | toString(): string;
|
2915 |
|
2916 | /** Returns the primitive value of the specified object. */
|
2917 | valueOf(): Int16Array;
|
2918 |
|
2919 | [index: number]: number;
|
2920 | }
|
2921 |
|
2922 | interface Int16ArrayConstructor {
|
2923 | readonly prototype: Int16Array;
|
2924 | new(length: number): Int16Array;
|
2925 | new(array: ArrayLike<number> | ArrayBufferLike): Int16Array;
|
2926 | new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array;
|
2927 |
|
2928 | /**
|
2929 | * The size in bytes of each element in the array.
|
2930 | */
|
2931 | readonly BYTES_PER_ELEMENT: number;
|
2932 |
|
2933 | /**
|
2934 | * Returns a new array from a set of elements.
|
2935 | * @param items A set of elements to include in the new array object.
|
2936 | */
|
2937 | of(...items: number[]): Int16Array;
|
2938 |
|
2939 | /**
|
2940 | * Creates an array from an array-like or iterable object.
|
2941 | * @param arrayLike An array-like or iterable object to convert to an array.
|
2942 | */
|
2943 | from(arrayLike: ArrayLike<number>): Int16Array;
|
2944 |
|
2945 | /**
|
2946 | * Creates an array from an array-like or iterable object.
|
2947 | * @param arrayLike An array-like or iterable object to convert to an array.
|
2948 | * @param mapfn A mapping function to call on every element of the array.
|
2949 | * @param thisArg Value of 'this' used to invoke the mapfn.
|
2950 | */
|
2951 | from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array;
|
2952 |
|
2953 |
|
2954 | }
|
2955 | declare var Int16Array: Int16ArrayConstructor;
|
2956 |
|
2957 | /**
|
2958 | * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
|
2959 | * requested number of bytes could not be allocated an exception is raised.
|
2960 | */
|
2961 | interface Uint16Array {
|
2962 | /**
|
2963 | * The size in bytes of each element in the array.
|
2964 | */
|
2965 | readonly BYTES_PER_ELEMENT: number;
|
2966 |
|
2967 | /**
|
2968 | * The ArrayBuffer instance referenced by the array.
|
2969 | */
|
2970 | readonly buffer: ArrayBufferLike;
|
2971 |
|
2972 | /**
|
2973 | * The length in bytes of the array.
|
2974 | */
|
2975 | readonly byteLength: number;
|
2976 |
|
2977 | /**
|
2978 | * The offset in bytes of the array.
|
2979 | */
|
2980 | readonly byteOffset: number;
|
2981 |
|
2982 | /**
|
2983 | * Returns the this object after copying a section of the array identified by start and end
|
2984 | * to the same array starting at position target
|
2985 | * @param target If target is negative, it is treated as length+target where length is the
|
2986 | * length of the array.
|
2987 | * @param start If start is negative, it is treated as length+start. If end is negative, it
|
2988 | * is treated as length+end.
|
2989 | * @param end If not specified, length of the this object is used as its default value.
|
2990 | */
|
2991 | copyWithin(target: number, start: number, end?: number): this;
|
2992 |
|
2993 | /**
|
2994 | * Determines whether all the members of an array satisfy the specified test.
|
2995 | * @param predicate A function that accepts up to three arguments. The every method calls
|
2996 | * the predicate function for each element in the array until the predicate returns a value
|
2997 | * which is coercible to the Boolean value false, or until the end of the array.
|
2998 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
2999 | * If thisArg is omitted, undefined is used as the this value.
|
3000 | */
|
3001 | every(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
|
3002 |
|
3003 | /**
|
3004 | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
3005 | * @param value value to fill array section with
|
3006 | * @param start index to start filling the array at. If start is negative, it is treated as
|
3007 | * length+start where length is the length of the array.
|
3008 | * @param end index to stop filling the array at. If end is negative, it is treated as
|
3009 | * length+end.
|
3010 | */
|
3011 | fill(value: number, start?: number, end?: number): this;
|
3012 |
|
3013 | /**
|
3014 | * Returns the elements of an array that meet the condition specified in a callback function.
|
3015 | * @param predicate A function that accepts up to three arguments. The filter method calls
|
3016 | * the predicate function one time for each element in the array.
|
3017 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
3018 | * If thisArg is omitted, undefined is used as the this value.
|
3019 | */
|
3020 | filter(predicate: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;
|
3021 |
|
3022 | /**
|
3023 | * Returns the value of the first element in the array where predicate is true, and undefined
|
3024 | * otherwise.
|
3025 | * @param predicate find calls predicate once for each element of the array, in ascending
|
3026 | * order, until it finds one where predicate returns true. If such an element is found, find
|
3027 | * immediately returns that element value. Otherwise, find returns undefined.
|
3028 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
3029 | * predicate. If it is not provided, undefined is used instead.
|
3030 | */
|
3031 | find(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined;
|
3032 |
|
3033 | /**
|
3034 | * Returns the index of the first element in the array where predicate is true, and -1
|
3035 | * otherwise.
|
3036 | * @param predicate find calls predicate once for each element of the array, in ascending
|
3037 | * order, until it finds one where predicate returns true. If such an element is found,
|
3038 | * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
|
3039 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
3040 | * predicate. If it is not provided, undefined is used instead.
|
3041 | */
|
3042 | findIndex(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number;
|
3043 |
|
3044 | /**
|
3045 | * Performs the specified action for each element in an array.
|
3046 | * @param callbackfn A function that accepts up to three arguments. forEach calls the
|
3047 | * callbackfn function one time for each element in the array.
|
3048 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
3049 | * If thisArg is omitted, undefined is used as the this value.
|
3050 | */
|
3051 | forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
|
3052 |
|
3053 | /**
|
3054 | * Returns the index of the first occurrence of a value in an array.
|
3055 | * @param searchElement The value to locate in the array.
|
3056 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
3057 | * search starts at index 0.
|
3058 | */
|
3059 | indexOf(searchElement: number, fromIndex?: number): number;
|
3060 |
|
3061 | /**
|
3062 | * Adds all the elements of an array separated by the specified separator string.
|
3063 | * @param separator A string used to separate one element of an array from the next in the
|
3064 | * resulting String. If omitted, the array elements are separated with a comma.
|
3065 | */
|
3066 | join(separator?: string): string;
|
3067 |
|
3068 | /**
|
3069 | * Returns the index of the last occurrence of a value in an array.
|
3070 | * @param searchElement The value to locate in the array.
|
3071 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
3072 | * search starts at index 0.
|
3073 | */
|
3074 | lastIndexOf(searchElement: number, fromIndex?: number): number;
|
3075 |
|
3076 | /**
|
3077 | * The length of the array.
|
3078 | */
|
3079 | readonly length: number;
|
3080 |
|
3081 | /**
|
3082 | * Calls a defined callback function on each element of an array, and returns an array that
|
3083 | * contains the results.
|
3084 | * @param callbackfn A function that accepts up to three arguments. The map method calls the
|
3085 | * callbackfn function one time for each element in the array.
|
3086 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
3087 | * If thisArg is omitted, undefined is used as the this value.
|
3088 | */
|
3089 | map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
|
3090 |
|
3091 | /**
|
3092 | * Calls the specified callback function for all the elements in an array. The return value of
|
3093 | * the callback function is the accumulated result, and is provided as an argument in the next
|
3094 | * call to the callback function.
|
3095 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
3096 | * callbackfn function one time for each element in the array.
|
3097 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3098 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3099 | * instead of an array value.
|
3100 | */
|
3101 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
|
3102 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
|
3103 |
|
3104 | /**
|
3105 | * Calls the specified callback function for all the elements in an array. The return value of
|
3106 | * the callback function is the accumulated result, and is provided as an argument in the next
|
3107 | * call to the callback function.
|
3108 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
3109 | * callbackfn function one time for each element in the array.
|
3110 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3111 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3112 | * instead of an array value.
|
3113 | */
|
3114 | reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
|
3115 |
|
3116 | /**
|
3117 | * Calls the specified callback function for all the elements in an array, in descending order.
|
3118 | * The return value of the callback function is the accumulated result, and is provided as an
|
3119 | * argument in the next call to the callback function.
|
3120 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
3121 | * the callbackfn function one time for each element in the array.
|
3122 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3123 | * the accumulation. The first call to the callbackfn function provides this value as an
|
3124 | * argument instead of an array value.
|
3125 | */
|
3126 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
|
3127 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
|
3128 |
|
3129 | /**
|
3130 | * Calls the specified callback function for all the elements in an array, in descending order.
|
3131 | * The return value of the callback function is the accumulated result, and is provided as an
|
3132 | * argument in the next call to the callback function.
|
3133 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
3134 | * the callbackfn function one time for each element in the array.
|
3135 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3136 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3137 | * instead of an array value.
|
3138 | */
|
3139 | reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
|
3140 |
|
3141 | /**
|
3142 | * Reverses the elements in an Array.
|
3143 | */
|
3144 | reverse(): Uint16Array;
|
3145 |
|
3146 | /**
|
3147 | * Sets a value or an array of values.
|
3148 | * @param array A typed or untyped array of values to set.
|
3149 | * @param offset The index in the current array at which the values are to be written.
|
3150 | */
|
3151 | set(array: ArrayLike<number>, offset?: number): void;
|
3152 |
|
3153 | /**
|
3154 | * Returns a section of an array.
|
3155 | * @param start The beginning of the specified portion of the array.
|
3156 | * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
3157 | */
|
3158 | slice(start?: number, end?: number): Uint16Array;
|
3159 |
|
3160 | /**
|
3161 | * Determines whether the specified callback function returns true for any element of an array.
|
3162 | * @param predicate A function that accepts up to three arguments. The some method calls
|
3163 | * the predicate function for each element in the array until the predicate returns a value
|
3164 | * which is coercible to the Boolean value true, or until the end of the array.
|
3165 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
3166 | * If thisArg is omitted, undefined is used as the this value.
|
3167 | */
|
3168 | some(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
|
3169 |
|
3170 | /**
|
3171 | * Sorts an array.
|
3172 | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
3173 | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
3174 | * value otherwise. If omitted, the elements are sorted in ascending order.
|
3175 | * ```ts
|
3176 | * [11,2,22,1].sort((a, b) => a - b)
|
3177 | * ```
|
3178 | */
|
3179 | sort(compareFn?: (a: number, b: number) => number): this;
|
3180 |
|
3181 | /**
|
3182 | * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
|
3183 | * at begin, inclusive, up to end, exclusive.
|
3184 | * @param begin The index of the beginning of the array.
|
3185 | * @param end The index of the end of the array.
|
3186 | */
|
3187 | subarray(begin?: number, end?: number): Uint16Array;
|
3188 |
|
3189 | /**
|
3190 | * Converts a number to a string by using the current locale.
|
3191 | */
|
3192 | toLocaleString(): string;
|
3193 |
|
3194 | /**
|
3195 | * Returns a string representation of an array.
|
3196 | */
|
3197 | toString(): string;
|
3198 |
|
3199 | /** Returns the primitive value of the specified object. */
|
3200 | valueOf(): Uint16Array;
|
3201 |
|
3202 | [index: number]: number;
|
3203 | }
|
3204 |
|
3205 | interface Uint16ArrayConstructor {
|
3206 | readonly prototype: Uint16Array;
|
3207 | new(length: number): Uint16Array;
|
3208 | new(array: ArrayLike<number> | ArrayBufferLike): Uint16Array;
|
3209 | new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
|
3210 |
|
3211 | /**
|
3212 | * The size in bytes of each element in the array.
|
3213 | */
|
3214 | readonly BYTES_PER_ELEMENT: number;
|
3215 |
|
3216 | /**
|
3217 | * Returns a new array from a set of elements.
|
3218 | * @param items A set of elements to include in the new array object.
|
3219 | */
|
3220 | of(...items: number[]): Uint16Array;
|
3221 |
|
3222 | /**
|
3223 | * Creates an array from an array-like or iterable object.
|
3224 | * @param arrayLike An array-like or iterable object to convert to an array.
|
3225 | */
|
3226 | from(arrayLike: ArrayLike<number>): Uint16Array;
|
3227 |
|
3228 | /**
|
3229 | * Creates an array from an array-like or iterable object.
|
3230 | * @param arrayLike An array-like or iterable object to convert to an array.
|
3231 | * @param mapfn A mapping function to call on every element of the array.
|
3232 | * @param thisArg Value of 'this' used to invoke the mapfn.
|
3233 | */
|
3234 | from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array;
|
3235 |
|
3236 |
|
3237 | }
|
3238 | declare var Uint16Array: Uint16ArrayConstructor;
|
3239 | /**
|
3240 | * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
|
3241 | * requested number of bytes could not be allocated an exception is raised.
|
3242 | */
|
3243 | interface Int32Array {
|
3244 | /**
|
3245 | * The size in bytes of each element in the array.
|
3246 | */
|
3247 | readonly BYTES_PER_ELEMENT: number;
|
3248 |
|
3249 | /**
|
3250 | * The ArrayBuffer instance referenced by the array.
|
3251 | */
|
3252 | readonly buffer: ArrayBufferLike;
|
3253 |
|
3254 | /**
|
3255 | * The length in bytes of the array.
|
3256 | */
|
3257 | readonly byteLength: number;
|
3258 |
|
3259 | /**
|
3260 | * The offset in bytes of the array.
|
3261 | */
|
3262 | readonly byteOffset: number;
|
3263 |
|
3264 | /**
|
3265 | * Returns the this object after copying a section of the array identified by start and end
|
3266 | * to the same array starting at position target
|
3267 | * @param target If target is negative, it is treated as length+target where length is the
|
3268 | * length of the array.
|
3269 | * @param start If start is negative, it is treated as length+start. If end is negative, it
|
3270 | * is treated as length+end.
|
3271 | * @param end If not specified, length of the this object is used as its default value.
|
3272 | */
|
3273 | copyWithin(target: number, start: number, end?: number): this;
|
3274 |
|
3275 | /**
|
3276 | * Determines whether all the members of an array satisfy the specified test.
|
3277 | * @param predicate A function that accepts up to three arguments. The every method calls
|
3278 | * the predicate function for each element in the array until the predicate returns a value
|
3279 | * which is coercible to the Boolean value false, or until the end of the array.
|
3280 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
3281 | * If thisArg is omitted, undefined is used as the this value.
|
3282 | */
|
3283 | every(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
|
3284 |
|
3285 | /**
|
3286 | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
3287 | * @param value value to fill array section with
|
3288 | * @param start index to start filling the array at. If start is negative, it is treated as
|
3289 | * length+start where length is the length of the array.
|
3290 | * @param end index to stop filling the array at. If end is negative, it is treated as
|
3291 | * length+end.
|
3292 | */
|
3293 | fill(value: number, start?: number, end?: number): this;
|
3294 |
|
3295 | /**
|
3296 | * Returns the elements of an array that meet the condition specified in a callback function.
|
3297 | * @param predicate A function that accepts up to three arguments. The filter method calls
|
3298 | * the predicate function one time for each element in the array.
|
3299 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
3300 | * If thisArg is omitted, undefined is used as the this value.
|
3301 | */
|
3302 | filter(predicate: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;
|
3303 |
|
3304 | /**
|
3305 | * Returns the value of the first element in the array where predicate is true, and undefined
|
3306 | * otherwise.
|
3307 | * @param predicate find calls predicate once for each element of the array, in ascending
|
3308 | * order, until it finds one where predicate returns true. If such an element is found, find
|
3309 | * immediately returns that element value. Otherwise, find returns undefined.
|
3310 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
3311 | * predicate. If it is not provided, undefined is used instead.
|
3312 | */
|
3313 | find(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined;
|
3314 |
|
3315 | /**
|
3316 | * Returns the index of the first element in the array where predicate is true, and -1
|
3317 | * otherwise.
|
3318 | * @param predicate find calls predicate once for each element of the array, in ascending
|
3319 | * order, until it finds one where predicate returns true. If such an element is found,
|
3320 | * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
|
3321 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
3322 | * predicate. If it is not provided, undefined is used instead.
|
3323 | */
|
3324 | findIndex(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number;
|
3325 |
|
3326 | /**
|
3327 | * Performs the specified action for each element in an array.
|
3328 | * @param callbackfn A function that accepts up to three arguments. forEach calls the
|
3329 | * callbackfn function one time for each element in the array.
|
3330 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
3331 | * If thisArg is omitted, undefined is used as the this value.
|
3332 | */
|
3333 | forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
|
3334 |
|
3335 | /**
|
3336 | * Returns the index of the first occurrence of a value in an array.
|
3337 | * @param searchElement The value to locate in the array.
|
3338 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
3339 | * search starts at index 0.
|
3340 | */
|
3341 | indexOf(searchElement: number, fromIndex?: number): number;
|
3342 |
|
3343 | /**
|
3344 | * Adds all the elements of an array separated by the specified separator string.
|
3345 | * @param separator A string used to separate one element of an array from the next in the
|
3346 | * resulting String. If omitted, the array elements are separated with a comma.
|
3347 | */
|
3348 | join(separator?: string): string;
|
3349 |
|
3350 | /**
|
3351 | * Returns the index of the last occurrence of a value in an array.
|
3352 | * @param searchElement The value to locate in the array.
|
3353 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
3354 | * search starts at index 0.
|
3355 | */
|
3356 | lastIndexOf(searchElement: number, fromIndex?: number): number;
|
3357 |
|
3358 | /**
|
3359 | * The length of the array.
|
3360 | */
|
3361 | readonly length: number;
|
3362 |
|
3363 | /**
|
3364 | * Calls a defined callback function on each element of an array, and returns an array that
|
3365 | * contains the results.
|
3366 | * @param callbackfn A function that accepts up to three arguments. The map method calls the
|
3367 | * callbackfn function one time for each element in the array.
|
3368 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
3369 | * If thisArg is omitted, undefined is used as the this value.
|
3370 | */
|
3371 | map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
|
3372 |
|
3373 | /**
|
3374 | * Calls the specified callback function for all the elements in an array. The return value of
|
3375 | * the callback function is the accumulated result, and is provided as an argument in the next
|
3376 | * call to the callback function.
|
3377 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
3378 | * callbackfn function one time for each element in the array.
|
3379 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3380 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3381 | * instead of an array value.
|
3382 | */
|
3383 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
|
3384 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
|
3385 |
|
3386 | /**
|
3387 | * Calls the specified callback function for all the elements in an array. The return value of
|
3388 | * the callback function is the accumulated result, and is provided as an argument in the next
|
3389 | * call to the callback function.
|
3390 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
3391 | * callbackfn function one time for each element in the array.
|
3392 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3393 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3394 | * instead of an array value.
|
3395 | */
|
3396 | reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
|
3397 |
|
3398 | /**
|
3399 | * Calls the specified callback function for all the elements in an array, in descending order.
|
3400 | * The return value of the callback function is the accumulated result, and is provided as an
|
3401 | * argument in the next call to the callback function.
|
3402 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
3403 | * the callbackfn function one time for each element in the array.
|
3404 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3405 | * the accumulation. The first call to the callbackfn function provides this value as an
|
3406 | * argument instead of an array value.
|
3407 | */
|
3408 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
|
3409 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
|
3410 |
|
3411 | /**
|
3412 | * Calls the specified callback function for all the elements in an array, in descending order.
|
3413 | * The return value of the callback function is the accumulated result, and is provided as an
|
3414 | * argument in the next call to the callback function.
|
3415 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
3416 | * the callbackfn function one time for each element in the array.
|
3417 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3418 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3419 | * instead of an array value.
|
3420 | */
|
3421 | reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
|
3422 |
|
3423 | /**
|
3424 | * Reverses the elements in an Array.
|
3425 | */
|
3426 | reverse(): Int32Array;
|
3427 |
|
3428 | /**
|
3429 | * Sets a value or an array of values.
|
3430 | * @param array A typed or untyped array of values to set.
|
3431 | * @param offset The index in the current array at which the values are to be written.
|
3432 | */
|
3433 | set(array: ArrayLike<number>, offset?: number): void;
|
3434 |
|
3435 | /**
|
3436 | * Returns a section of an array.
|
3437 | * @param start The beginning of the specified portion of the array.
|
3438 | * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
3439 | */
|
3440 | slice(start?: number, end?: number): Int32Array;
|
3441 |
|
3442 | /**
|
3443 | * Determines whether the specified callback function returns true for any element of an array.
|
3444 | * @param predicate A function that accepts up to three arguments. The some method calls
|
3445 | * the predicate function for each element in the array until the predicate returns a value
|
3446 | * which is coercible to the Boolean value true, or until the end of the array.
|
3447 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
3448 | * If thisArg is omitted, undefined is used as the this value.
|
3449 | */
|
3450 | some(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
|
3451 |
|
3452 | /**
|
3453 | * Sorts an array.
|
3454 | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
3455 | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
3456 | * value otherwise. If omitted, the elements are sorted in ascending order.
|
3457 | * ```ts
|
3458 | * [11,2,22,1].sort((a, b) => a - b)
|
3459 | * ```
|
3460 | */
|
3461 | sort(compareFn?: (a: number, b: number) => number): this;
|
3462 |
|
3463 | /**
|
3464 | * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
|
3465 | * at begin, inclusive, up to end, exclusive.
|
3466 | * @param begin The index of the beginning of the array.
|
3467 | * @param end The index of the end of the array.
|
3468 | */
|
3469 | subarray(begin?: number, end?: number): Int32Array;
|
3470 |
|
3471 | /**
|
3472 | * Converts a number to a string by using the current locale.
|
3473 | */
|
3474 | toLocaleString(): string;
|
3475 |
|
3476 | /**
|
3477 | * Returns a string representation of an array.
|
3478 | */
|
3479 | toString(): string;
|
3480 |
|
3481 | /** Returns the primitive value of the specified object. */
|
3482 | valueOf(): Int32Array;
|
3483 |
|
3484 | [index: number]: number;
|
3485 | }
|
3486 |
|
3487 | interface Int32ArrayConstructor {
|
3488 | readonly prototype: Int32Array;
|
3489 | new(length: number): Int32Array;
|
3490 | new(array: ArrayLike<number> | ArrayBufferLike): Int32Array;
|
3491 | new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array;
|
3492 |
|
3493 | /**
|
3494 | * The size in bytes of each element in the array.
|
3495 | */
|
3496 | readonly BYTES_PER_ELEMENT: number;
|
3497 |
|
3498 | /**
|
3499 | * Returns a new array from a set of elements.
|
3500 | * @param items A set of elements to include in the new array object.
|
3501 | */
|
3502 | of(...items: number[]): Int32Array;
|
3503 |
|
3504 | /**
|
3505 | * Creates an array from an array-like or iterable object.
|
3506 | * @param arrayLike An array-like or iterable object to convert to an array.
|
3507 | */
|
3508 | from(arrayLike: ArrayLike<number>): Int32Array;
|
3509 |
|
3510 | /**
|
3511 | * Creates an array from an array-like or iterable object.
|
3512 | * @param arrayLike An array-like or iterable object to convert to an array.
|
3513 | * @param mapfn A mapping function to call on every element of the array.
|
3514 | * @param thisArg Value of 'this' used to invoke the mapfn.
|
3515 | */
|
3516 | from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array;
|
3517 |
|
3518 | }
|
3519 | declare var Int32Array: Int32ArrayConstructor;
|
3520 |
|
3521 | /**
|
3522 | * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
|
3523 | * requested number of bytes could not be allocated an exception is raised.
|
3524 | */
|
3525 | interface Uint32Array {
|
3526 | /**
|
3527 | * The size in bytes of each element in the array.
|
3528 | */
|
3529 | readonly BYTES_PER_ELEMENT: number;
|
3530 |
|
3531 | /**
|
3532 | * The ArrayBuffer instance referenced by the array.
|
3533 | */
|
3534 | readonly buffer: ArrayBufferLike;
|
3535 |
|
3536 | /**
|
3537 | * The length in bytes of the array.
|
3538 | */
|
3539 | readonly byteLength: number;
|
3540 |
|
3541 | /**
|
3542 | * The offset in bytes of the array.
|
3543 | */
|
3544 | readonly byteOffset: number;
|
3545 |
|
3546 | /**
|
3547 | * Returns the this object after copying a section of the array identified by start and end
|
3548 | * to the same array starting at position target
|
3549 | * @param target If target is negative, it is treated as length+target where length is the
|
3550 | * length of the array.
|
3551 | * @param start If start is negative, it is treated as length+start. If end is negative, it
|
3552 | * is treated as length+end.
|
3553 | * @param end If not specified, length of the this object is used as its default value.
|
3554 | */
|
3555 | copyWithin(target: number, start: number, end?: number): this;
|
3556 |
|
3557 | /**
|
3558 | * Determines whether all the members of an array satisfy the specified test.
|
3559 | * @param predicate A function that accepts up to three arguments. The every method calls
|
3560 | * the predicate function for each element in the array until the predicate returns a value
|
3561 | * which is coercible to the Boolean value false, or until the end of the array.
|
3562 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
3563 | * If thisArg is omitted, undefined is used as the this value.
|
3564 | */
|
3565 | every(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
|
3566 |
|
3567 | /**
|
3568 | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
3569 | * @param value value to fill array section with
|
3570 | * @param start index to start filling the array at. If start is negative, it is treated as
|
3571 | * length+start where length is the length of the array.
|
3572 | * @param end index to stop filling the array at. If end is negative, it is treated as
|
3573 | * length+end.
|
3574 | */
|
3575 | fill(value: number, start?: number, end?: number): this;
|
3576 |
|
3577 | /**
|
3578 | * Returns the elements of an array that meet the condition specified in a callback function.
|
3579 | * @param predicate A function that accepts up to three arguments. The filter method calls
|
3580 | * the predicate function one time for each element in the array.
|
3581 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
3582 | * If thisArg is omitted, undefined is used as the this value.
|
3583 | */
|
3584 | filter(predicate: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;
|
3585 |
|
3586 | /**
|
3587 | * Returns the value of the first element in the array where predicate is true, and undefined
|
3588 | * otherwise.
|
3589 | * @param predicate find calls predicate once for each element of the array, in ascending
|
3590 | * order, until it finds one where predicate returns true. If such an element is found, find
|
3591 | * immediately returns that element value. Otherwise, find returns undefined.
|
3592 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
3593 | * predicate. If it is not provided, undefined is used instead.
|
3594 | */
|
3595 | find(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined;
|
3596 |
|
3597 | /**
|
3598 | * Returns the index of the first element in the array where predicate is true, and -1
|
3599 | * otherwise.
|
3600 | * @param predicate find calls predicate once for each element of the array, in ascending
|
3601 | * order, until it finds one where predicate returns true. If such an element is found,
|
3602 | * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
|
3603 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
3604 | * predicate. If it is not provided, undefined is used instead.
|
3605 | */
|
3606 | findIndex(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number;
|
3607 |
|
3608 | /**
|
3609 | * Performs the specified action for each element in an array.
|
3610 | * @param callbackfn A function that accepts up to three arguments. forEach calls the
|
3611 | * callbackfn function one time for each element in the array.
|
3612 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
3613 | * If thisArg is omitted, undefined is used as the this value.
|
3614 | */
|
3615 | forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
|
3616 | /**
|
3617 | * Returns the index of the first occurrence of a value in an array.
|
3618 | * @param searchElement The value to locate in the array.
|
3619 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
3620 | * search starts at index 0.
|
3621 | */
|
3622 | indexOf(searchElement: number, fromIndex?: number): number;
|
3623 |
|
3624 | /**
|
3625 | * Adds all the elements of an array separated by the specified separator string.
|
3626 | * @param separator A string used to separate one element of an array from the next in the
|
3627 | * resulting String. If omitted, the array elements are separated with a comma.
|
3628 | */
|
3629 | join(separator?: string): string;
|
3630 |
|
3631 | /**
|
3632 | * Returns the index of the last occurrence of a value in an array.
|
3633 | * @param searchElement The value to locate in the array.
|
3634 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
3635 | * search starts at index 0.
|
3636 | */
|
3637 | lastIndexOf(searchElement: number, fromIndex?: number): number;
|
3638 |
|
3639 | /**
|
3640 | * The length of the array.
|
3641 | */
|
3642 | readonly length: number;
|
3643 |
|
3644 | /**
|
3645 | * Calls a defined callback function on each element of an array, and returns an array that
|
3646 | * contains the results.
|
3647 | * @param callbackfn A function that accepts up to three arguments. The map method calls the
|
3648 | * callbackfn function one time for each element in the array.
|
3649 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
3650 | * If thisArg is omitted, undefined is used as the this value.
|
3651 | */
|
3652 | map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
|
3653 |
|
3654 | /**
|
3655 | * Calls the specified callback function for all the elements in an array. The return value of
|
3656 | * the callback function is the accumulated result, and is provided as an argument in the next
|
3657 | * call to the callback function.
|
3658 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
3659 | * callbackfn function one time for each element in the array.
|
3660 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3661 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3662 | * instead of an array value.
|
3663 | */
|
3664 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
|
3665 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
|
3666 |
|
3667 | /**
|
3668 | * Calls the specified callback function for all the elements in an array. The return value of
|
3669 | * the callback function is the accumulated result, and is provided as an argument in the next
|
3670 | * call to the callback function.
|
3671 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
3672 | * callbackfn function one time for each element in the array.
|
3673 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3674 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3675 | * instead of an array value.
|
3676 | */
|
3677 | reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
|
3678 |
|
3679 | /**
|
3680 | * Calls the specified callback function for all the elements in an array, in descending order.
|
3681 | * The return value of the callback function is the accumulated result, and is provided as an
|
3682 | * argument in the next call to the callback function.
|
3683 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
3684 | * the callbackfn function one time for each element in the array.
|
3685 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3686 | * the accumulation. The first call to the callbackfn function provides this value as an
|
3687 | * argument instead of an array value.
|
3688 | */
|
3689 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
|
3690 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
|
3691 |
|
3692 | /**
|
3693 | * Calls the specified callback function for all the elements in an array, in descending order.
|
3694 | * The return value of the callback function is the accumulated result, and is provided as an
|
3695 | * argument in the next call to the callback function.
|
3696 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
3697 | * the callbackfn function one time for each element in the array.
|
3698 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3699 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3700 | * instead of an array value.
|
3701 | */
|
3702 | reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
|
3703 |
|
3704 | /**
|
3705 | * Reverses the elements in an Array.
|
3706 | */
|
3707 | reverse(): Uint32Array;
|
3708 |
|
3709 | /**
|
3710 | * Sets a value or an array of values.
|
3711 | * @param array A typed or untyped array of values to set.
|
3712 | * @param offset The index in the current array at which the values are to be written.
|
3713 | */
|
3714 | set(array: ArrayLike<number>, offset?: number): void;
|
3715 |
|
3716 | /**
|
3717 | * Returns a section of an array.
|
3718 | * @param start The beginning of the specified portion of the array.
|
3719 | * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
3720 | */
|
3721 | slice(start?: number, end?: number): Uint32Array;
|
3722 |
|
3723 | /**
|
3724 | * Determines whether the specified callback function returns true for any element of an array.
|
3725 | * @param predicate A function that accepts up to three arguments. The some method calls
|
3726 | * the predicate function for each element in the array until the predicate returns a value
|
3727 | * which is coercible to the Boolean value true, or until the end of the array.
|
3728 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
3729 | * If thisArg is omitted, undefined is used as the this value.
|
3730 | */
|
3731 | some(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
|
3732 |
|
3733 | /**
|
3734 | * Sorts an array.
|
3735 | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
3736 | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
3737 | * value otherwise. If omitted, the elements are sorted in ascending order.
|
3738 | * ```ts
|
3739 | * [11,2,22,1].sort((a, b) => a - b)
|
3740 | * ```
|
3741 | */
|
3742 | sort(compareFn?: (a: number, b: number) => number): this;
|
3743 |
|
3744 | /**
|
3745 | * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
|
3746 | * at begin, inclusive, up to end, exclusive.
|
3747 | * @param begin The index of the beginning of the array.
|
3748 | * @param end The index of the end of the array.
|
3749 | */
|
3750 | subarray(begin?: number, end?: number): Uint32Array;
|
3751 |
|
3752 | /**
|
3753 | * Converts a number to a string by using the current locale.
|
3754 | */
|
3755 | toLocaleString(): string;
|
3756 |
|
3757 | /**
|
3758 | * Returns a string representation of an array.
|
3759 | */
|
3760 | toString(): string;
|
3761 |
|
3762 | /** Returns the primitive value of the specified object. */
|
3763 | valueOf(): Uint32Array;
|
3764 |
|
3765 | [index: number]: number;
|
3766 | }
|
3767 |
|
3768 | interface Uint32ArrayConstructor {
|
3769 | readonly prototype: Uint32Array;
|
3770 | new(length: number): Uint32Array;
|
3771 | new(array: ArrayLike<number> | ArrayBufferLike): Uint32Array;
|
3772 | new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array;
|
3773 |
|
3774 | /**
|
3775 | * The size in bytes of each element in the array.
|
3776 | */
|
3777 | readonly BYTES_PER_ELEMENT: number;
|
3778 |
|
3779 | /**
|
3780 | * Returns a new array from a set of elements.
|
3781 | * @param items A set of elements to include in the new array object.
|
3782 | */
|
3783 | of(...items: number[]): Uint32Array;
|
3784 |
|
3785 | /**
|
3786 | * Creates an array from an array-like or iterable object.
|
3787 | * @param arrayLike An array-like or iterable object to convert to an array.
|
3788 | */
|
3789 | from(arrayLike: ArrayLike<number>): Uint32Array;
|
3790 |
|
3791 | /**
|
3792 | * Creates an array from an array-like or iterable object.
|
3793 | * @param arrayLike An array-like or iterable object to convert to an array.
|
3794 | * @param mapfn A mapping function to call on every element of the array.
|
3795 | * @param thisArg Value of 'this' used to invoke the mapfn.
|
3796 | */
|
3797 | from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array;
|
3798 |
|
3799 | }
|
3800 | declare var Uint32Array: Uint32ArrayConstructor;
|
3801 |
|
3802 | /**
|
3803 | * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
|
3804 | * of bytes could not be allocated an exception is raised.
|
3805 | */
|
3806 | interface Float32Array {
|
3807 | /**
|
3808 | * The size in bytes of each element in the array.
|
3809 | */
|
3810 | readonly BYTES_PER_ELEMENT: number;
|
3811 |
|
3812 | /**
|
3813 | * The ArrayBuffer instance referenced by the array.
|
3814 | */
|
3815 | readonly buffer: ArrayBufferLike;
|
3816 |
|
3817 | /**
|
3818 | * The length in bytes of the array.
|
3819 | */
|
3820 | readonly byteLength: number;
|
3821 |
|
3822 | /**
|
3823 | * The offset in bytes of the array.
|
3824 | */
|
3825 | readonly byteOffset: number;
|
3826 |
|
3827 | /**
|
3828 | * Returns the this object after copying a section of the array identified by start and end
|
3829 | * to the same array starting at position target
|
3830 | * @param target If target is negative, it is treated as length+target where length is the
|
3831 | * length of the array.
|
3832 | * @param start If start is negative, it is treated as length+start. If end is negative, it
|
3833 | * is treated as length+end.
|
3834 | * @param end If not specified, length of the this object is used as its default value.
|
3835 | */
|
3836 | copyWithin(target: number, start: number, end?: number): this;
|
3837 |
|
3838 | /**
|
3839 | * Determines whether all the members of an array satisfy the specified test.
|
3840 | * @param predicate A function that accepts up to three arguments. The every method calls
|
3841 | * the predicate function for each element in the array until the predicate returns a value
|
3842 | * which is coercible to the Boolean value false, or until the end of the array.
|
3843 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
3844 | * If thisArg is omitted, undefined is used as the this value.
|
3845 | */
|
3846 | every(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
|
3847 |
|
3848 | /**
|
3849 | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
3850 | * @param value value to fill array section with
|
3851 | * @param start index to start filling the array at. If start is negative, it is treated as
|
3852 | * length+start where length is the length of the array.
|
3853 | * @param end index to stop filling the array at. If end is negative, it is treated as
|
3854 | * length+end.
|
3855 | */
|
3856 | fill(value: number, start?: number, end?: number): this;
|
3857 |
|
3858 | /**
|
3859 | * Returns the elements of an array that meet the condition specified in a callback function.
|
3860 | * @param predicate A function that accepts up to three arguments. The filter method calls
|
3861 | * the predicate function one time for each element in the array.
|
3862 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
3863 | * If thisArg is omitted, undefined is used as the this value.
|
3864 | */
|
3865 | filter(predicate: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;
|
3866 |
|
3867 | /**
|
3868 | * Returns the value of the first element in the array where predicate is true, and undefined
|
3869 | * otherwise.
|
3870 | * @param predicate find calls predicate once for each element of the array, in ascending
|
3871 | * order, until it finds one where predicate returns true. If such an element is found, find
|
3872 | * immediately returns that element value. Otherwise, find returns undefined.
|
3873 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
3874 | * predicate. If it is not provided, undefined is used instead.
|
3875 | */
|
3876 | find(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined;
|
3877 |
|
3878 | /**
|
3879 | * Returns the index of the first element in the array where predicate is true, and -1
|
3880 | * otherwise.
|
3881 | * @param predicate find calls predicate once for each element of the array, in ascending
|
3882 | * order, until it finds one where predicate returns true. If such an element is found,
|
3883 | * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
|
3884 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
3885 | * predicate. If it is not provided, undefined is used instead.
|
3886 | */
|
3887 | findIndex(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number;
|
3888 |
|
3889 | /**
|
3890 | * Performs the specified action for each element in an array.
|
3891 | * @param callbackfn A function that accepts up to three arguments. forEach calls the
|
3892 | * callbackfn function one time for each element in the array.
|
3893 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
3894 | * If thisArg is omitted, undefined is used as the this value.
|
3895 | */
|
3896 | forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
|
3897 |
|
3898 | /**
|
3899 | * Returns the index of the first occurrence of a value in an array.
|
3900 | * @param searchElement The value to locate in the array.
|
3901 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
3902 | * search starts at index 0.
|
3903 | */
|
3904 | indexOf(searchElement: number, fromIndex?: number): number;
|
3905 |
|
3906 | /**
|
3907 | * Adds all the elements of an array separated by the specified separator string.
|
3908 | * @param separator A string used to separate one element of an array from the next in the
|
3909 | * resulting String. If omitted, the array elements are separated with a comma.
|
3910 | */
|
3911 | join(separator?: string): string;
|
3912 |
|
3913 | /**
|
3914 | * Returns the index of the last occurrence of a value in an array.
|
3915 | * @param searchElement The value to locate in the array.
|
3916 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
3917 | * search starts at index 0.
|
3918 | */
|
3919 | lastIndexOf(searchElement: number, fromIndex?: number): number;
|
3920 |
|
3921 | /**
|
3922 | * The length of the array.
|
3923 | */
|
3924 | readonly length: number;
|
3925 |
|
3926 | /**
|
3927 | * Calls a defined callback function on each element of an array, and returns an array that
|
3928 | * contains the results.
|
3929 | * @param callbackfn A function that accepts up to three arguments. The map method calls the
|
3930 | * callbackfn function one time for each element in the array.
|
3931 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
3932 | * If thisArg is omitted, undefined is used as the this value.
|
3933 | */
|
3934 | map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
|
3935 |
|
3936 | /**
|
3937 | * Calls the specified callback function for all the elements in an array. The return value of
|
3938 | * the callback function is the accumulated result, and is provided as an argument in the next
|
3939 | * call to the callback function.
|
3940 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
3941 | * callbackfn function one time for each element in the array.
|
3942 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3943 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3944 | * instead of an array value.
|
3945 | */
|
3946 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
|
3947 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
|
3948 |
|
3949 | /**
|
3950 | * Calls the specified callback function for all the elements in an array. The return value of
|
3951 | * the callback function is the accumulated result, and is provided as an argument in the next
|
3952 | * call to the callback function.
|
3953 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
3954 | * callbackfn function one time for each element in the array.
|
3955 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3956 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3957 | * instead of an array value.
|
3958 | */
|
3959 | reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
|
3960 |
|
3961 | /**
|
3962 | * Calls the specified callback function for all the elements in an array, in descending order.
|
3963 | * The return value of the callback function is the accumulated result, and is provided as an
|
3964 | * argument in the next call to the callback function.
|
3965 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
3966 | * the callbackfn function one time for each element in the array.
|
3967 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3968 | * the accumulation. The first call to the callbackfn function provides this value as an
|
3969 | * argument instead of an array value.
|
3970 | */
|
3971 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
|
3972 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
|
3973 |
|
3974 | /**
|
3975 | * Calls the specified callback function for all the elements in an array, in descending order.
|
3976 | * The return value of the callback function is the accumulated result, and is provided as an
|
3977 | * argument in the next call to the callback function.
|
3978 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
3979 | * the callbackfn function one time for each element in the array.
|
3980 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
3981 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
3982 | * instead of an array value.
|
3983 | */
|
3984 | reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
|
3985 |
|
3986 | /**
|
3987 | * Reverses the elements in an Array.
|
3988 | */
|
3989 | reverse(): Float32Array;
|
3990 |
|
3991 | /**
|
3992 | * Sets a value or an array of values.
|
3993 | * @param array A typed or untyped array of values to set.
|
3994 | * @param offset The index in the current array at which the values are to be written.
|
3995 | */
|
3996 | set(array: ArrayLike<number>, offset?: number): void;
|
3997 |
|
3998 | /**
|
3999 | * Returns a section of an array.
|
4000 | * @param start The beginning of the specified portion of the array.
|
4001 | * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
4002 | */
|
4003 | slice(start?: number, end?: number): Float32Array;
|
4004 |
|
4005 | /**
|
4006 | * Determines whether the specified callback function returns true for any element of an array.
|
4007 | * @param predicate A function that accepts up to three arguments. The some method calls
|
4008 | * the predicate function for each element in the array until the predicate returns a value
|
4009 | * which is coercible to the Boolean value true, or until the end of the array.
|
4010 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
4011 | * If thisArg is omitted, undefined is used as the this value.
|
4012 | */
|
4013 | some(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
|
4014 |
|
4015 | /**
|
4016 | * Sorts an array.
|
4017 | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
4018 | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
4019 | * value otherwise. If omitted, the elements are sorted in ascending order.
|
4020 | * ```ts
|
4021 | * [11,2,22,1].sort((a, b) => a - b)
|
4022 | * ```
|
4023 | */
|
4024 | sort(compareFn?: (a: number, b: number) => number): this;
|
4025 |
|
4026 | /**
|
4027 | * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
|
4028 | * at begin, inclusive, up to end, exclusive.
|
4029 | * @param begin The index of the beginning of the array.
|
4030 | * @param end The index of the end of the array.
|
4031 | */
|
4032 | subarray(begin?: number, end?: number): Float32Array;
|
4033 |
|
4034 | /**
|
4035 | * Converts a number to a string by using the current locale.
|
4036 | */
|
4037 | toLocaleString(): string;
|
4038 |
|
4039 | /**
|
4040 | * Returns a string representation of an array.
|
4041 | */
|
4042 | toString(): string;
|
4043 |
|
4044 | /** Returns the primitive value of the specified object. */
|
4045 | valueOf(): Float32Array;
|
4046 |
|
4047 | [index: number]: number;
|
4048 | }
|
4049 |
|
4050 | interface Float32ArrayConstructor {
|
4051 | readonly prototype: Float32Array;
|
4052 | new(length: number): Float32Array;
|
4053 | new(array: ArrayLike<number> | ArrayBufferLike): Float32Array;
|
4054 | new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array;
|
4055 |
|
4056 | /**
|
4057 | * The size in bytes of each element in the array.
|
4058 | */
|
4059 | readonly BYTES_PER_ELEMENT: number;
|
4060 |
|
4061 | /**
|
4062 | * Returns a new array from a set of elements.
|
4063 | * @param items A set of elements to include in the new array object.
|
4064 | */
|
4065 | of(...items: number[]): Float32Array;
|
4066 |
|
4067 | /**
|
4068 | * Creates an array from an array-like or iterable object.
|
4069 | * @param arrayLike An array-like or iterable object to convert to an array.
|
4070 | */
|
4071 | from(arrayLike: ArrayLike<number>): Float32Array;
|
4072 |
|
4073 | /**
|
4074 | * Creates an array from an array-like or iterable object.
|
4075 | * @param arrayLike An array-like or iterable object to convert to an array.
|
4076 | * @param mapfn A mapping function to call on every element of the array.
|
4077 | * @param thisArg Value of 'this' used to invoke the mapfn.
|
4078 | */
|
4079 | from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array;
|
4080 |
|
4081 |
|
4082 | }
|
4083 | declare var Float32Array: Float32ArrayConstructor;
|
4084 |
|
4085 | /**
|
4086 | * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
|
4087 | * number of bytes could not be allocated an exception is raised.
|
4088 | */
|
4089 | interface Float64Array {
|
4090 | /**
|
4091 | * The size in bytes of each element in the array.
|
4092 | */
|
4093 | readonly BYTES_PER_ELEMENT: number;
|
4094 |
|
4095 | /**
|
4096 | * The ArrayBuffer instance referenced by the array.
|
4097 | */
|
4098 | readonly buffer: ArrayBufferLike;
|
4099 |
|
4100 | /**
|
4101 | * The length in bytes of the array.
|
4102 | */
|
4103 | readonly byteLength: number;
|
4104 |
|
4105 | /**
|
4106 | * The offset in bytes of the array.
|
4107 | */
|
4108 | readonly byteOffset: number;
|
4109 |
|
4110 | /**
|
4111 | * Returns the this object after copying a section of the array identified by start and end
|
4112 | * to the same array starting at position target
|
4113 | * @param target If target is negative, it is treated as length+target where length is the
|
4114 | * length of the array.
|
4115 | * @param start If start is negative, it is treated as length+start. If end is negative, it
|
4116 | * is treated as length+end.
|
4117 | * @param end If not specified, length of the this object is used as its default value.
|
4118 | */
|
4119 | copyWithin(target: number, start: number, end?: number): this;
|
4120 |
|
4121 | /**
|
4122 | * Determines whether all the members of an array satisfy the specified test.
|
4123 | * @param predicate A function that accepts up to three arguments. The every method calls
|
4124 | * the predicate function for each element in the array until the predicate returns a value
|
4125 | * which is coercible to the Boolean value false, or until the end of the array.
|
4126 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
4127 | * If thisArg is omitted, undefined is used as the this value.
|
4128 | */
|
4129 | every(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
|
4130 |
|
4131 | /**
|
4132 | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
4133 | * @param value value to fill array section with
|
4134 | * @param start index to start filling the array at. If start is negative, it is treated as
|
4135 | * length+start where length is the length of the array.
|
4136 | * @param end index to stop filling the array at. If end is negative, it is treated as
|
4137 | * length+end.
|
4138 | */
|
4139 | fill(value: number, start?: number, end?: number): this;
|
4140 |
|
4141 | /**
|
4142 | * Returns the elements of an array that meet the condition specified in a callback function.
|
4143 | * @param predicate A function that accepts up to three arguments. The filter method calls
|
4144 | * the predicate function one time for each element in the array.
|
4145 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
4146 | * If thisArg is omitted, undefined is used as the this value.
|
4147 | */
|
4148 | filter(predicate: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;
|
4149 |
|
4150 | /**
|
4151 | * Returns the value of the first element in the array where predicate is true, and undefined
|
4152 | * otherwise.
|
4153 | * @param predicate find calls predicate once for each element of the array, in ascending
|
4154 | * order, until it finds one where predicate returns true. If such an element is found, find
|
4155 | * immediately returns that element value. Otherwise, find returns undefined.
|
4156 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
4157 | * predicate. If it is not provided, undefined is used instead.
|
4158 | */
|
4159 | find(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined;
|
4160 |
|
4161 | /**
|
4162 | * Returns the index of the first element in the array where predicate is true, and -1
|
4163 | * otherwise.
|
4164 | * @param predicate find calls predicate once for each element of the array, in ascending
|
4165 | * order, until it finds one where predicate returns true. If such an element is found,
|
4166 | * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
|
4167 | * @param thisArg If provided, it will be used as the this value for each invocation of
|
4168 | * predicate. If it is not provided, undefined is used instead.
|
4169 | */
|
4170 | findIndex(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number;
|
4171 |
|
4172 | /**
|
4173 | * Performs the specified action for each element in an array.
|
4174 | * @param callbackfn A function that accepts up to three arguments. forEach calls the
|
4175 | * callbackfn function one time for each element in the array.
|
4176 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
4177 | * If thisArg is omitted, undefined is used as the this value.
|
4178 | */
|
4179 | forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
|
4180 |
|
4181 | /**
|
4182 | * Returns the index of the first occurrence of a value in an array.
|
4183 | * @param searchElement The value to locate in the array.
|
4184 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
4185 | * search starts at index 0.
|
4186 | */
|
4187 | indexOf(searchElement: number, fromIndex?: number): number;
|
4188 |
|
4189 | /**
|
4190 | * Adds all the elements of an array separated by the specified separator string.
|
4191 | * @param separator A string used to separate one element of an array from the next in the
|
4192 | * resulting String. If omitted, the array elements are separated with a comma.
|
4193 | */
|
4194 | join(separator?: string): string;
|
4195 |
|
4196 | /**
|
4197 | * Returns the index of the last occurrence of a value in an array.
|
4198 | * @param searchElement The value to locate in the array.
|
4199 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
4200 | * search starts at index 0.
|
4201 | */
|
4202 | lastIndexOf(searchElement: number, fromIndex?: number): number;
|
4203 |
|
4204 | /**
|
4205 | * The length of the array.
|
4206 | */
|
4207 | readonly length: number;
|
4208 |
|
4209 | /**
|
4210 | * Calls a defined callback function on each element of an array, and returns an array that
|
4211 | * contains the results.
|
4212 | * @param callbackfn A function that accepts up to three arguments. The map method calls the
|
4213 | * callbackfn function one time for each element in the array.
|
4214 | * @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
4215 | * If thisArg is omitted, undefined is used as the this value.
|
4216 | */
|
4217 | map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
|
4218 |
|
4219 | /**
|
4220 | * Calls the specified callback function for all the elements in an array. The return value of
|
4221 | * the callback function is the accumulated result, and is provided as an argument in the next
|
4222 | * call to the callback function.
|
4223 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
4224 | * callbackfn function one time for each element in the array.
|
4225 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
4226 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
4227 | * instead of an array value.
|
4228 | */
|
4229 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
|
4230 | reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
|
4231 |
|
4232 | /**
|
4233 | * Calls the specified callback function for all the elements in an array. The return value of
|
4234 | * the callback function is the accumulated result, and is provided as an argument in the next
|
4235 | * call to the callback function.
|
4236 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
|
4237 | * callbackfn function one time for each element in the array.
|
4238 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
4239 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
4240 | * instead of an array value.
|
4241 | */
|
4242 | reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
|
4243 |
|
4244 | /**
|
4245 | * Calls the specified callback function for all the elements in an array, in descending order.
|
4246 | * The return value of the callback function is the accumulated result, and is provided as an
|
4247 | * argument in the next call to the callback function.
|
4248 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
4249 | * the callbackfn function one time for each element in the array.
|
4250 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
4251 | * the accumulation. The first call to the callbackfn function provides this value as an
|
4252 | * argument instead of an array value.
|
4253 | */
|
4254 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
|
4255 | reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
|
4256 |
|
4257 | /**
|
4258 | * Calls the specified callback function for all the elements in an array, in descending order.
|
4259 | * The return value of the callback function is the accumulated result, and is provided as an
|
4260 | * argument in the next call to the callback function.
|
4261 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
|
4262 | * the callbackfn function one time for each element in the array.
|
4263 | * @param initialValue If initialValue is specified, it is used as the initial value to start
|
4264 | * the accumulation. The first call to the callbackfn function provides this value as an argument
|
4265 | * instead of an array value.
|
4266 | */
|
4267 | reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
|
4268 |
|
4269 | /**
|
4270 | * Reverses the elements in an Array.
|
4271 | */
|
4272 | reverse(): Float64Array;
|
4273 |
|
4274 | /**
|
4275 | * Sets a value or an array of values.
|
4276 | * @param array A typed or untyped array of values to set.
|
4277 | * @param offset The index in the current array at which the values are to be written.
|
4278 | */
|
4279 | set(array: ArrayLike<number>, offset?: number): void;
|
4280 |
|
4281 | /**
|
4282 | * Returns a section of an array.
|
4283 | * @param start The beginning of the specified portion of the array.
|
4284 | * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
4285 | */
|
4286 | slice(start?: number, end?: number): Float64Array;
|
4287 |
|
4288 | /**
|
4289 | * Determines whether the specified callback function returns true for any element of an array.
|
4290 | * @param predicate A function that accepts up to three arguments. The some method calls
|
4291 | * the predicate function for each element in the array until the predicate returns a value
|
4292 | * which is coercible to the Boolean value true, or until the end of the array.
|
4293 | * @param thisArg An object to which the this keyword can refer in the predicate function.
|
4294 | * If thisArg is omitted, undefined is used as the this value.
|
4295 | */
|
4296 | some(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
|
4297 |
|
4298 | /**
|
4299 | * Sorts an array.
|
4300 | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
4301 | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
4302 | * value otherwise. If omitted, the elements are sorted in ascending order.
|
4303 | * ```ts
|
4304 | * [11,2,22,1].sort((a, b) => a - b)
|
4305 | * ```
|
4306 | */
|
4307 | sort(compareFn?: (a: number, b: number) => number): this;
|
4308 |
|
4309 | /**
|
4310 | * at begin, inclusive, up to end, exclusive.
|
4311 | * @param begin The index of the beginning of the array.
|
4312 | * @param end The index of the end of the array.
|
4313 | */
|
4314 | subarray(begin?: number, end?: number): Float64Array;
|
4315 |
|
4316 | toString(): string;
|
4317 |
|
4318 | /** Returns the primitive value of the specified object. */
|
4319 | valueOf(): Float64Array;
|
4320 |
|
4321 | [index: number]: number;
|
4322 | }
|
4323 |
|
4324 | interface Float64ArrayConstructor {
|
4325 | readonly prototype: Float64Array;
|
4326 | new(length: number): Float64Array;
|
4327 | new(array: ArrayLike<number> | ArrayBufferLike): Float64Array;
|
4328 | new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array;
|
4329 |
|
4330 | /**
|
4331 | * The size in bytes of each element in the array.
|
4332 | */
|
4333 | readonly BYTES_PER_ELEMENT: number;
|
4334 |
|
4335 | /**
|
4336 | * Returns a new array from a set of elements.
|
4337 | * @param items A set of elements to include in the new array object.
|
4338 | */
|
4339 | of(...items: number[]): Float64Array;
|
4340 |
|
4341 | /**
|
4342 | * Creates an array from an array-like or iterable object.
|
4343 | * @param arrayLike An array-like or iterable object to convert to an array.
|
4344 | */
|
4345 | from(arrayLike: ArrayLike<number>): Float64Array;
|
4346 |
|
4347 | /**
|
4348 | * Creates an array from an array-like or iterable object.
|
4349 | * @param arrayLike An array-like or iterable object to convert to an array.
|
4350 | * @param mapfn A mapping function to call on every element of the array.
|
4351 | * @param thisArg Value of 'this' used to invoke the mapfn.
|
4352 | */
|
4353 | from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array;
|
4354 |
|
4355 | }
|
4356 | declare var Float64Array: Float64ArrayConstructor;
|
4357 |
|
4358 | /////////////////////////////
|
4359 | /// ECMAScript Internationalization API
|
4360 | /////////////////////////////
|
4361 |
|
4362 | declare namespace Intl {
|
4363 | interface CollatorOptions {
|
4364 | usage?: string | undefined;
|
4365 | localeMatcher?: string | undefined;
|
4366 | numeric?: boolean | undefined;
|
4367 | caseFirst?: string | undefined;
|
4368 | sensitivity?: string | undefined;
|
4369 | ignorePunctuation?: boolean | undefined;
|
4370 | }
|
4371 |
|
4372 | interface ResolvedCollatorOptions {
|
4373 | locale: string;
|
4374 | usage: string;
|
4375 | sensitivity: string;
|
4376 | ignorePunctuation: boolean;
|
4377 | collation: string;
|
4378 | caseFirst: string;
|
4379 | numeric: boolean;
|
4380 | }
|
4381 |
|
4382 | interface Collator {
|
4383 | compare(x: string, y: string): number;
|
4384 | resolvedOptions(): ResolvedCollatorOptions;
|
4385 | }
|
4386 | var Collator: {
|
4387 | new(locales?: string | string[], options?: CollatorOptions): Collator;
|
4388 | (locales?: string | string[], options?: CollatorOptions): Collator;
|
4389 | supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
|
4390 | };
|
4391 |
|
4392 | interface NumberFormatOptions {
|
4393 | localeMatcher?: string | undefined;
|
4394 | style?: string | undefined;
|
4395 | currency?: string | undefined;
|
4396 | currencySign?: string | undefined;
|
4397 | useGrouping?: boolean | undefined;
|
4398 | minimumIntegerDigits?: number | undefined;
|
4399 | minimumFractionDigits?: number | undefined;
|
4400 | maximumFractionDigits?: number | undefined;
|
4401 | minimumSignificantDigits?: number | undefined;
|
4402 | maximumSignificantDigits?: number | undefined;
|
4403 | }
|
4404 |
|
4405 | interface ResolvedNumberFormatOptions {
|
4406 | locale: string;
|
4407 | numberingSystem: string;
|
4408 | style: string;
|
4409 | currency?: string;
|
4410 | minimumIntegerDigits: number;
|
4411 | minimumFractionDigits: number;
|
4412 | maximumFractionDigits: number;
|
4413 | minimumSignificantDigits?: number;
|
4414 | maximumSignificantDigits?: number;
|
4415 | useGrouping: boolean;
|
4416 | }
|
4417 |
|
4418 | interface NumberFormat {
|
4419 | format(value: number): string;
|
4420 | resolvedOptions(): ResolvedNumberFormatOptions;
|
4421 | }
|
4422 | var NumberFormat: {
|
4423 | new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
|
4424 | (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
|
4425 | supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
|
4426 | readonly prototype: NumberFormat;
|
4427 | };
|
4428 |
|
4429 | interface DateTimeFormatOptions {
|
4430 | localeMatcher?: "best fit" | "lookup" | undefined;
|
4431 | weekday?: "long" | "short" | "narrow" | undefined;
|
4432 | era?: "long" | "short" | "narrow" | undefined;
|
4433 | year?: "numeric" | "2-digit" | undefined;
|
4434 | month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined;
|
4435 | day?: "numeric" | "2-digit" | undefined;
|
4436 | hour?: "numeric" | "2-digit" | undefined;
|
4437 | minute?: "numeric" | "2-digit" | undefined;
|
4438 | second?: "numeric" | "2-digit" | undefined;
|
4439 | timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined;
|
4440 | formatMatcher?: "best fit" | "basic" | undefined;
|
4441 | hour12?: boolean | undefined;
|
4442 | timeZone?: string | undefined;
|
4443 | }
|
4444 |
|
4445 | interface ResolvedDateTimeFormatOptions {
|
4446 | locale: string;
|
4447 | calendar: string;
|
4448 | numberingSystem: string;
|
4449 | timeZone: string;
|
4450 | hour12?: boolean;
|
4451 | weekday?: string;
|
4452 | era?: string;
|
4453 | year?: string;
|
4454 | month?: string;
|
4455 | day?: string;
|
4456 | hour?: string;
|
4457 | minute?: string;
|
4458 | second?: string;
|
4459 | timeZoneName?: string;
|
4460 | }
|
4461 |
|
4462 | interface DateTimeFormat {
|
4463 | format(date?: Date | number): string;
|
4464 | resolvedOptions(): ResolvedDateTimeFormatOptions;
|
4465 | }
|
4466 | var DateTimeFormat: {
|
4467 | new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
|
4468 | (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
|
4469 | supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
|
4470 | readonly prototype: DateTimeFormat;
|
4471 | };
|
4472 | }
|
4473 |
|
4474 | interface String {
|
4475 | /**
|
4476 | * Determines whether two strings are equivalent in the current or specified locale.
|
4477 | * @param that String to compare to target string
|
4478 | * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
|
4479 | * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
|
4480 | */
|
4481 | localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
|
4482 | }
|
4483 |
|
4484 | interface Number {
|
4485 | /**
|
4486 | * Converts a number to a string by using the current or specified locale.
|
4487 | * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
4488 | * @param options An object that contains one or more properties that specify comparison options.
|
4489 | */
|
4490 | toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
|
4491 | }
|
4492 |
|
4493 | interface Date {
|
4494 | /**
|
4495 | * Converts a date and time to a string by using the current or specified locale.
|
4496 | * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
4497 | * @param options An object that contains one or more properties that specify comparison options.
|
4498 | */
|
4499 | toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
4500 | /**
|
4501 | * Converts a date to a string by using the current or specified locale.
|
4502 | * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
4503 | * @param options An object that contains one or more properties that specify comparison options.
|
4504 | */
|
4505 | toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
4506 |
|
4507 | /**
|
4508 | * Converts a time to a string by using the current or specified locale.
|
4509 | * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
4510 | * @param options An object that contains one or more properties that specify comparison options.
|
4511 | */
|
4512 | toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
4513 | }
|
4514 |
|
\ | No newline at end of file |