-
Notifications
You must be signed in to change notification settings - Fork 0
/
xqlint.d.ts
68 lines (65 loc) · 1.82 KB
/
xqlint.d.ts
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
declare module '@quodatum/xqlint' {
import { Position } from "vscode";
export class XQLint {
constructor(source: string, opts?: object);
public getCompletions(pos: Position): [object];
public getXQDoc(withPos?: boolean): XQDoc;
public getAST(pos?: Position): any;
public printAST(): string;
public getSctx(pos?: Position): any;
public getErrors(): [Marker];
public getWarnings(): [Marker];
public getDocLinks(): [[DocLink]];
public getProcessor():string;
public getProcessors():[string];
public getLibrary():[object];
}
//
export class Marker {
pos: LintRange;
type: string; // error,warning
level: string; //same as type??
message: string; // '[code] ...'
}
export class DocLink {
range: LintRange;
uri: string; // uri after at
}
export class LintRange {
sl: number;
sc: number;
el: number;
ec: number;
}
export class XQDoc {
moduleNamespace: string;
description: string;
variables: [VarDecl];
functions: [FunDecl];
queryBody?: LintRange;
}
export interface VarDecl {
name: string;
type: string;
description?: string;
//comments: Comment;
pos: LintRange;
}
export interface FunDecl {
name: string;
arity: number;
params: string[]; // name
description?: string;
pos: LintRange;
}
export interface Comment {
description: string;
params: object;
errors: string[];
others: string[];
}
export function XQueryLexer(): any;
export function createStaticContext(processor: string): any;
export function CodeFormatter(ast: object): any;
export function CodeFormatter(ast: object, newLinesEnabled: boolean, DEBUG: any): any;
}