File: index.d.ts

package info (click to toggle)
node-prosemirror-model 1.16.1%2B~cs1.1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 420 kB
  • sloc: javascript: 3,393; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 731 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
declare class OrderedMap<T = any> {
  private constructor(content: Array<string | T>)

  get(key: string): T | undefined

  update(key: string, value: T, newKey?: string): OrderedMap<T>

  remove(key: string): OrderedMap<T>

  addToStart(key: string, value: T): OrderedMap<T>

  addToEnd(key: string, value: T): OrderedMap<T>

  addBefore(place: string, key: string, value: T): OrderedMap<T>

  forEach(fn: (key: string, value: T) => any): void

  prepend(map: MapLike<T>): OrderedMap<T>

  append(map: MapLike<T>): OrderedMap<T>

  subtract(map: MapLike<T>): OrderedMap<T>

  readonly size: number

  static from<T>(map: MapLike<T>): OrderedMap<T>
}

type MapLike<T = any> = Record<string, T> | OrderedMap<T>

export = OrderedMap