Repository navigation
Expand file tree
/
Copy pathtypes.d.ts
More file actions
68 lines (68 loc) · 1.78 KB
/
Copy pathtypes.d.ts
File metadata and controls
68 lines (68 loc) · 1.78 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
* Version information for the current Scramjet build.
* Contains both the semantic version string and the git commit hash for build identification.
*/
export interface ScramjetVersionInfo {
/** The semantic version */
version: string;
/** The git commit hash that this build was created from */
build: string;
/** The date of the build */
date: string;
}
/**
* Scramjet Feature Flags, configured at build time
*/
export type ScramjetFlags = {
syncxhr: boolean;
disableComputedWrap: boolean;
rewriterLogs: boolean;
captureErrors: boolean;
cleanErrors: boolean;
scramitize: boolean;
sourcemaps: boolean;
destructureRewrites: boolean;
allowInvalidJs: boolean;
allowFailedIntercepts: boolean;
debugTrampolines: boolean;
debugSourceURL: boolean;
encapsulateWorkers: boolean;
};
export interface ScramjetConfig {
globals: {
wrapfn: string;
wrappropertybase: string;
wrappropertyfn: string;
cleanrestfn: string;
importfn: string;
rewritefn: string;
metafn: string;
wrappostmessagefn: string;
pushsourcemapfn: string;
trysetfn: string;
templocid: string;
tempunusedid: string;
};
maskedfiles: string[];
flags: ScramjetFlags;
siteFlags: Record<string, Partial<ScramjetFlags>>;
}
/**
* The config for Scramjet initialization.
*/
export interface ScramjetInitConfig extends Omit<ScramjetConfig, "codec" | "flags"> {
flags: Partial<ScramjetFlags>;
codec: {
encode: (url: string) => string;
decode: (url: string) => string;
};
}
declare global {
interface Window {
WASM: string;
REAL_WASM: Uint8Array;
}
interface HTMLDocument {
}
}
export type AnyFunction = Function;