index.d.ts 533 B

1234567891011
  1. export default class RopeSequence<T> {
  2. length: number
  3. prepend(other: RopeSequence<T> | readonly T[]): RopeSequence<T>
  4. append(other: RopeSequence<T> | readonly T[]): RopeSequence<T>
  5. slice(from: number, to?: number): RopeSequence<T>
  6. get(i: number): T
  7. forEach(f: (elt: T, index: number) => boolean | void, from?: number, to?: number): void
  8. map<U>(f: (elt: T, index: number) => U, from?: number, to?: number): U[]
  9. static from<T>(value: readonly T[] | RopeSequence<T>): RopeSequence<T>
  10. static empty: RopeSequence<any>
  11. }