-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStacktrace.d.ts
More file actions
75 lines (75 loc) · 2.58 KB
/
Stacktrace.d.ts
File metadata and controls
75 lines (75 loc) · 2.58 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
69
70
71
72
73
74
75
declare function isValidFile(file: any): boolean;
declare let launchTime: number;
declare let isHorizon: boolean;
declare let InnerCorePackages: any;
declare let showToast: typeof print;
declare function getLoadedModList(): any;
declare function fetchScriptSources(mod: any): {};
declare function setupLoadedSources(mods: any): void;
declare namespace setupLoadedSources {
let mods: {};
let sources: {};
}
declare function getModName(id: any): string;
declare function findAvailabledMods(name: any): string[];
declare function findRelatedSources(name: any, file: any): {};
declare function reformatSpecial(element: any): any;
declare function requireFormat(message: any): {
message: string;
exec: RegExpExecArray;
} | {
message: any;
exec?: undefined;
};
declare function translateMessage(message: any): any;
declare function resolveTraceSource(line: any): {
trace: any;
where: any;
line: any;
source: any;
file: any;
};
declare function sliceMessageWithoutTrace(message: any, line: any): any;
declare function retraceToArray(trace: any): any;
declare function fetchErrorMessage(error: any): string;
declare function fetchErrorName(error: any): string;
declare function saveOrRewrite(path: any, text: any): void;
declare function addTranslation(prefix: any, who: any, translation: any): void;
declare namespace addTranslation {
let messages: {};
}
/**
* Fetches error message and represent it
* into localized string without source.
* @param {Error|string} error to localize
* @returns {string} represented stroke
*/
declare function localizeError(error: Error | string): string;
/**
* Reports catched modification errors,
* may used in [[catch]]-block when any throw
* code occurs. Stacktrace will be displayed
* on display with sources hieracly.
* @param {Error|any} error value to report
*/
declare function reportTrace(error: Error | any): void;
declare namespace reportTrace {
let isReporting: boolean;
let handled: any[];
function postUpdate(dialog: any, error: any, date: any): {
inProcess: () => boolean;
toResult: () => any;
cancel: () => void;
};
function processFile(file: any, where: any): any[];
function processSources(related: any, resolved: any, where: any): any[];
function processStack(resolved: any): string;
function handleRequest(handler: any, update: any, trace: any): {
formatted: any[];
};
function findNextTrace(): any;
function fetchTime(): number;
function toCode(error: any): string;
function setupPrint(action: any): boolean;
function reloadModifications(): void;
}