Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib/es2020.bigint.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ interface BigInt64Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike>
includes(searchElement: bigint, fromIndex?: number): boolean;

/**
* Returns the index of the first occurrence of a value in an array.
* Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand All @@ -241,7 +241,7 @@ interface BigInt64Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike>
keys(): ArrayIterator<number>;

/**
* Returns the index of the last occurrence of a value in an array.
* Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand Down Expand Up @@ -500,7 +500,7 @@ interface BigUint64Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike>
includes(searchElement: bigint, fromIndex?: number): boolean;

/**
* Returns the index of the first occurrence of a value in an array.
* Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand All @@ -518,7 +518,7 @@ interface BigUint64Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike>
keys(): ArrayIterator<number>;

/**
* Returns the index of the last occurrence of a value in an array.
* Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand Down
40 changes: 20 additions & 20 deletions src/lib/es5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,14 @@ interface String {
concat(...strings: string[]): string;

/**
* Returns the position of the first occurrence of a substring.
* Returns the position of the first occurrence of a substring, or -1 if it is not present.
* @param searchString The substring to search for in the string
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
*/
indexOf(searchString: string, position?: number): number;

/**
* Returns the last occurrence of a substring in the string.
* Returns the last occurrence of a substring in the string, or -1 if it is not present.
* @param searchString The substring to search for.
* @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
*/
Expand Down Expand Up @@ -1948,7 +1948,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;

/**
* Returns the index of the first occurrence of a value in an array.
* Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand All @@ -1963,7 +1963,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
join(separator?: string): string;

/**
* Returns the index of the last occurrence of a value in an array.
* Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand Down Expand Up @@ -2229,7 +2229,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;

/**
* Returns the index of the first occurrence of a value in an array.
* Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand All @@ -2244,7 +2244,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
join(separator?: string): string;

/**
* Returns the index of the last occurrence of a value in an array.
* Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand Down Expand Up @@ -2510,7 +2510,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;

/**
* Returns the index of the first occurrence of a value in an array.
* Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand All @@ -2525,7 +2525,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
join(separator?: string): string;

/**
* Returns the index of the last occurrence of a value in an array.
* Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand Down Expand Up @@ -2790,7 +2790,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
*/
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
/**
* Returns the index of the first occurrence of a value in an array.
* Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand All @@ -2805,7 +2805,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
join(separator?: string): string;

/**
* Returns the index of the last occurrence of a value in an array.
* Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand Down Expand Up @@ -3071,7 +3071,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;

/**
* Returns the index of the first occurrence of a value in an array.
* Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand All @@ -3086,7 +3086,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
join(separator?: string): string;

/**
* Returns the index of the last occurrence of a value in an array.
* Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand Down Expand Up @@ -3351,7 +3351,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;

/**
* Returns the index of the first occurrence of a value in an array.
* Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand All @@ -3366,7 +3366,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
join(separator?: string): string;

/**
* Returns the index of the last occurrence of a value in an array.
* Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand Down Expand Up @@ -3631,7 +3631,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
*/
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
/**
* Returns the index of the first occurrence of a value in an array.
* Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand All @@ -3646,7 +3646,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
join(separator?: string): string;

/**
* Returns the index of the last occurrence of a value in an array.
* Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand Down Expand Up @@ -3912,7 +3912,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;

/**
* Returns the index of the first occurrence of a value in an array.
* Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand All @@ -3927,7 +3927,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
join(separator?: string): string;

/**
* Returns the index of the last occurrence of a value in an array.
* Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand Down Expand Up @@ -4193,7 +4193,7 @@ interface Float64Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;

/**
* Returns the index of the first occurrence of a value in an array.
* Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand All @@ -4208,7 +4208,7 @@ interface Float64Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
join(separator?: string): string;

/**
* Returns the index of the last occurrence of a value in an array.
* Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
Expand Down
7 changes: 4 additions & 3 deletions tests/baselines/reference/1.0lib-noErrors.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,14 @@ interface String {
concat(...strings: string[]): string;

/**
* Returns the position of the first occurrence of a substring.
* Returns the position of the first occurrence of a substring, or -1 if it is not present.
* @param searchString The substring to search for in the string
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
*/
indexOf(searchString: string, position?: number): number;

/**
* Returns the last occurrence of a substring in the string.
* Returns the last occurrence of a substring in the string, or -1 if it is not present.
* @param searchString The substring to search for.
* @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
*/
Expand Down Expand Up @@ -1143,7 +1143,8 @@ declare var Array: {
<T>(...items: T[]): T[];
isArray(arg: any): boolean;
prototype: Array<any>;
}
}


//// [1.0lib-noErrors.js]
/* *****************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/1.0lib-noErrors.symbols
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ interface String {
>strings : Symbol(strings, Decl(1.0lib-noErrors.ts, 293, 11))

/**
* Returns the position of the first occurrence of a substring.
* Returns the position of the first occurrence of a substring, or -1 if it is not present.
* @param searchString The substring to search for in the string
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
*/
Expand All @@ -450,7 +450,7 @@ interface String {
>position : Symbol(position, Decl(1.0lib-noErrors.ts, 300, 33))

/**
* Returns the last occurrence of a substring in the string.
* Returns the last occurrence of a substring in the string, or -1 if it is not present.
* @param searchString The substring to search for.
* @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/1.0lib-noErrors.types
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ interface String {
> : ^^^^^^^^

/**
* Returns the position of the first occurrence of a substring.
* Returns the position of the first occurrence of a substring, or -1 if it is not present.
* @param searchString The substring to search for in the string
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
*/
Expand All @@ -504,7 +504,7 @@ interface String {
> : ^^^^^^

/**
* Returns the last occurrence of a substring in the string.
* Returns the last occurrence of a substring in the string, or -1 if it is not present.
* @param searchString The substring to search for.
* @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/completionsStringMethods.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@
],
"documentation": [
{
"text": "Returns the position of the first occurrence of a substring.",
"text": "Returns the position of the first occurrence of a substring, or -1 if it is not present.",
"kind": "text"
}
],
Expand Down Expand Up @@ -585,7 +585,7 @@
],
"documentation": [
{
"text": "Returns the last occurrence of a substring in the string.",
"text": "Returns the last occurrence of a substring in the string, or -1 if it is not present.",
"kind": "text"
}
],
Expand Down
6 changes: 3 additions & 3 deletions tests/cases/conformance/decorators/1.0lib-noErrors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,14 @@ interface String {
concat(...strings: string[]): string;

/**
* Returns the position of the first occurrence of a substring.
* Returns the position of the first occurrence of a substring, or -1 if it is not present.
* @param searchString The substring to search for in the string
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
*/
indexOf(searchString: string, position?: number): number;

/**
* Returns the last occurrence of a substring in the string.
* Returns the last occurrence of a substring in the string, or -1 if it is not present.
* @param searchString The substring to search for.
* @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
*/
Expand Down Expand Up @@ -1141,4 +1141,4 @@ declare var Array: {
<T>(...items: T[]): T[];
isArray(arg: any): boolean;
prototype: Array<any>;
}
}