forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
esprima.d.ts
36 lines (30 loc) · 898 Bytes
/
esprima.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
// Type definitions for Esprima v2.1.0
// Project: http://esprima.org
// Definitions by: teppeis <https://github.com/teppeis>, RReverser <https://github.com/RReverser>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../estree/estree.d.ts" />
declare module esprima {
var version: string
function parse(code: string, options?: Options): ESTree.Program
function tokenize(code: string, options?: Options): Array<Token>
interface Token {
type: string
value: string
}
interface Comment extends ESTree.Node {
value: string
}
interface Options {
loc?: boolean
range?: boolean
raw?: boolean
tokens?: boolean
comment?: boolean
attachComment?: boolean
tolerant?: boolean
source?: boolean
}
}
declare module "esprima" {
export = esprima
}