This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from acutmore/new-method-names
use 'to' prefix for method names
- Loading branch information
Showing
5 changed files
with
145 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,72 @@ | ||
declare global { | ||
interface Array<T> { | ||
withAt(index: number, value: T): T[]; | ||
withReversed(): T[]; | ||
withSorted(compareFn?: (a: T, b: T) => number): T[]; | ||
withSpliced(start: number, deleteCount?: number, ...values: T[]): T[]; | ||
with(index: number, value: T): T[]; | ||
toReversed(): T[]; | ||
toSorted(compareFn?: (a: T, b: T) => number): T[]; | ||
toSpliced(start: number, deleteCount?: number, ...values: T[]): T[]; | ||
} | ||
|
||
interface Int8Array { | ||
withAt(index: number, value: number): this; | ||
withReversed(): this; | ||
withSorted(compareFn?: (a: number, b: number) => number): this; | ||
withSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
with(index: number, value: number): this; | ||
toReversed(): this; | ||
toSorted(compareFn?: (a: number, b: number) => number): this; | ||
toSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
} | ||
|
||
interface Uint8Array { | ||
withAt(index: number, value: number): this; | ||
withReversed(): this; | ||
withSorted(compareFn?: (a: number, b: number) => number): this; | ||
withSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
with(index: number, value: number): this; | ||
toReversed(): this; | ||
toSorted(compareFn?: (a: number, b: number) => number): this; | ||
toSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
} | ||
|
||
interface Uint8ClampedArray { | ||
withAt(index: number, value: number): this; | ||
withReversed(): this; | ||
withSorted(compareFn?: (a: number, b: number) => number): this; | ||
withSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
with(index: number, value: number): this; | ||
toReversed(): this; | ||
toSorted(compareFn?: (a: number, b: number) => number): this; | ||
toSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
} | ||
|
||
interface Int16Array { | ||
withAt(index: number, value: number): this; | ||
withReversed(): this; | ||
withSorted(compareFn?: (a: number, b: number) => number): this; | ||
withSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
with(index: number, value: number): this; | ||
toReversed(): this; | ||
toSorted(compareFn?: (a: number, b: number) => number): this; | ||
toSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
} | ||
|
||
interface Uint16Array { | ||
withAt(index: number, value: number): this; | ||
withReversed(): this; | ||
withSorted(compareFn?: (a: number, b: number) => number): this; | ||
withSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
with(index: number, value: number): this; | ||
toReversed(): this; | ||
toSorted(compareFn?: (a: number, b: number) => number): this; | ||
toSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
} | ||
|
||
interface Int32Array { | ||
withAt(index: number, value: number): this; | ||
withReversed(): this; | ||
withSorted(compareFn?: (a: number, b: number) => number): this; | ||
withSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
with(index: number, value: number): this; | ||
toReversed(): this; | ||
toSorted(compareFn?: (a: number, b: number) => number): this; | ||
toSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
} | ||
|
||
interface Uint32Array { | ||
withAt(index: number, value: number): this; | ||
withReversed(): this; | ||
withSorted(compareFn?: (a: number, b: number) => number): this; | ||
withSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
with(index: number, value: number): this; | ||
toReversed(): this; | ||
toSorted(compareFn?: (a: number, b: number) => number): this; | ||
toSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
} | ||
|
||
interface Float32Array { | ||
withAt(index: number, value: number): this; | ||
withReversed(): this; | ||
withSorted(compareFn?: (a: number, b: number) => number): this; | ||
withSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
with(index: number, value: number): this; | ||
toReversed(): this; | ||
toSorted(compareFn?: (a: number, b: number) => number): this; | ||
toSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
} | ||
|
||
interface Float64Array { | ||
withAt(index: number, value: number): this; | ||
withReversed(): this; | ||
withSorted(compareFn?: (a: number, b: number) => number): this; | ||
withSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
with(index: number, value: number): this; | ||
toReversed(): this; | ||
toSorted(compareFn?: (a: number, b: number) => number): this; | ||
toSpliced(start: number, deleteCount?: number, ...values: number[]): this; | ||
} | ||
} | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.