Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: better Array#includes #17 #21

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 14 additions & 2 deletions generated/lib.es2016.array.include.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,29 @@ interface Array<T> {
* @param searchElement The element to search for.
* @param fromIndex The position in this array at which to begin searching for searchElement.
*/
includes(searchElement: T, fromIndex?: number): boolean;
includes(searchElement: unknown, fromIndex?: number): searchElement is T;
}
// /**
// * Determines whether an array includes a certain element, returning true or false as appropriate.
// * @param searchElement The element to search for.
// * @param fromIndex The position in this array at which to begin searching for searchElement.
// */
// includes(searchElement: T, fromIndex?: number): boolean;

interface ReadonlyArray<T> {
/**
* Determines whether an array includes a certain element, returning true or false as appropriate.
* @param searchElement The element to search for.
* @param fromIndex The position in this array at which to begin searching for searchElement.
*/
includes(searchElement: T, fromIndex?: number): boolean;
includes(searchElement: unknown, fromIndex?: number): searchElement is T;
}
// /**
// * Determines whether an array includes a certain element, returning true or false as appropriate.
// * @param searchElement The element to search for.
// * @param fromIndex The position in this array at which to begin searching for searchElement.
// */
// includes(searchElement: T, fromIndex?: number): boolean;

interface Int8Array {
/**
Expand Down
17 changes: 17 additions & 0 deletions lib/lib.es2016.array.include.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
interface Array<T> {
/**
* Determines whether an array includes a certain element, returning true or false as appropriate.
* @param searchElement The element to search for.
* @param fromIndex The position in this array at which to begin searching for searchElement.
*/
includes(searchElement: unknown, fromIndex?: number): searchElement is T;
}

interface ReadonlyArray<T> {
/**
* Determines whether an array includes a certain element, returning true or false as appropriate.
* @param searchElement The element to search for.
* @param fromIndex The position in this array at which to begin searching for searchElement.
*/
includes(searchElement: unknown, fromIndex?: number): searchElement is T;
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading