-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
56 lines (50 loc) · 1.39 KB
/
index.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
/*!
* Copyright (C) 2017 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/code-sniper/graphs/contributors
* @url http://glayzzle.com
*/
declare module "code-sniper" {
class Location {
public filename:string;
public start: {
line: number,
col: number,
offset: number
};
public end: {
line: number,
col: number,
offset: number
};
}
class Rule {
public namespace:string;
}
class Message {
public static LEVEL_CRITICAL:string;
public static LEVEL_IMPORTANT:string;
public static LEVEL_WARNING:string;
public static LEVEL_NOTICE:string;
public rule:Rule;
public level:string;
public location:Location;
public text:string;
}
class Report {
public clear(): Report;
public addMessage(filename:string, message:Message): Report;
public getMessages(): Message[];
public getMessageCount(level:string): number;
}
/**
* Initialise a new code sniper instance
*/
export default class Sniper {
public report:Report;
constructor(options?: any);
public setOptions(options: any): Sniper;
public clear(): Sniper;
public getParser(): any;
public parseFile(filename:String, buffer: String): any;
}
}