lib.es2016.array.include.d.ts (5204B)
1 /*! ***************************************************************************** 2 Copyright (c) Microsoft Corporation. All rights reserved. 3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 this file except in compliance with the License. You may obtain a copy of the 5 License at http://www.apache.org/licenses/LICENSE-2.0 6 7 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 8 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 9 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 10 MERCHANTABLITY OR NON-INFRINGEMENT. 11 12 See the Apache Version 2.0 License for specific language governing permissions 13 and limitations under the License. 14 ***************************************************************************** */ 15 16 17 /// <reference no-default-lib="true"/> 18 19 interface Array<T> { 20 /** 21 * Determines whether an array includes a certain element, returning true or false as appropriate. 22 * @param searchElement The element to search for. 23 * @param fromIndex The position in this array at which to begin searching for searchElement. 24 */ 25 includes(searchElement: T, fromIndex?: number): boolean; 26 } 27 28 interface ReadonlyArray<T> { 29 /** 30 * Determines whether an array includes a certain element, returning true or false as appropriate. 31 * @param searchElement The element to search for. 32 * @param fromIndex The position in this array at which to begin searching for searchElement. 33 */ 34 includes(searchElement: T, fromIndex?: number): boolean; 35 } 36 37 interface Int8Array<TArrayBuffer extends ArrayBufferLike> { 38 /** 39 * Determines whether an array includes a certain element, returning true or false as appropriate. 40 * @param searchElement The element to search for. 41 * @param fromIndex The position in this array at which to begin searching for searchElement. 42 */ 43 includes(searchElement: number, fromIndex?: number): boolean; 44 } 45 46 interface Uint8Array<TArrayBuffer extends ArrayBufferLike> { 47 /** 48 * Determines whether an array includes a certain element, returning true or false as appropriate. 49 * @param searchElement The element to search for. 50 * @param fromIndex The position in this array at which to begin searching for searchElement. 51 */ 52 includes(searchElement: number, fromIndex?: number): boolean; 53 } 54 55 interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> { 56 /** 57 * Determines whether an array includes a certain element, returning true or false as appropriate. 58 * @param searchElement The element to search for. 59 * @param fromIndex The position in this array at which to begin searching for searchElement. 60 */ 61 includes(searchElement: number, fromIndex?: number): boolean; 62 } 63 64 interface Int16Array<TArrayBuffer extends ArrayBufferLike> { 65 /** 66 * Determines whether an array includes a certain element, returning true or false as appropriate. 67 * @param searchElement The element to search for. 68 * @param fromIndex The position in this array at which to begin searching for searchElement. 69 */ 70 includes(searchElement: number, fromIndex?: number): boolean; 71 } 72 73 interface Uint16Array<TArrayBuffer extends ArrayBufferLike> { 74 /** 75 * Determines whether an array includes a certain element, returning true or false as appropriate. 76 * @param searchElement The element to search for. 77 * @param fromIndex The position in this array at which to begin searching for searchElement. 78 */ 79 includes(searchElement: number, fromIndex?: number): boolean; 80 } 81 82 interface Int32Array<TArrayBuffer extends ArrayBufferLike> { 83 /** 84 * Determines whether an array includes a certain element, returning true or false as appropriate. 85 * @param searchElement The element to search for. 86 * @param fromIndex The position in this array at which to begin searching for searchElement. 87 */ 88 includes(searchElement: number, fromIndex?: number): boolean; 89 } 90 91 interface Uint32Array<TArrayBuffer extends ArrayBufferLike> { 92 /** 93 * Determines whether an array includes a certain element, returning true or false as appropriate. 94 * @param searchElement The element to search for. 95 * @param fromIndex The position in this array at which to begin searching for searchElement. 96 */ 97 includes(searchElement: number, fromIndex?: number): boolean; 98 } 99 100 interface Float32Array<TArrayBuffer extends ArrayBufferLike> { 101 /** 102 * Determines whether an array includes a certain element, returning true or false as appropriate. 103 * @param searchElement The element to search for. 104 * @param fromIndex The position in this array at which to begin searching for searchElement. 105 */ 106 includes(searchElement: number, fromIndex?: number): boolean; 107 } 108 109 interface Float64Array<TArrayBuffer extends ArrayBufferLike> { 110 /** 111 * Determines whether an array includes a certain element, returning true or false as appropriate. 112 * @param searchElement The element to search for. 113 * @param fromIndex The position in this array at which to begin searching for searchElement. 114 */ 115 includes(searchElement: number, fromIndex?: number): boolean; 116 }