summaryrefslogtreecommitdiff
path: root/app/_re2.d.ts
blob: dff5e49de9b4d0abd9e220d226fc5c16e55532b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2022 The RE2 Authors.  All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

export type Info = {
  pattern: ArrayBuffer|Uint8Array|Uint8ClampedArray|Int8Array|string,
  error: ArrayBuffer|Uint8Array|Uint8ClampedArray|Int8Array|string,
  prefix: ArrayBuffer|Uint8Array|Uint8ClampedArray|Int8Array|string,
  prefix_foldcase: boolean,
  accel_prefix: ArrayBuffer|Uint8Array|Uint8ClampedArray|Int8Array|string,
  accel_prefix_foldcase: boolean,
  num_captures: number,
  is_one_pass: boolean,
  can_bit_state: boolean,
  bytecode: ArrayBuffer|Uint8Array|Uint8ClampedArray|Int8Array|string,
  bytemap: ArrayBuffer|Uint8Array|Uint8ClampedArray|Int8Array|string,
};

export interface MainModule {
  getInfo(pattern: ArrayBuffer|Uint8Array|Uint8ClampedArray|Int8Array|string): Info;
}

export default function loadModule(): Promise<MainModule>;