UNPKG

1.66 kBTypeScriptView Raw
1// Type definitions for esutils 2.0
2// Project: https://github.com/estools/esutils
3// Definitions by: Rhythm Bhiwani <https://github.com/rhythmbhiwani>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6export = esutils;
7
8declare const esutils: {
9 ast: {
10 isExpression: (node: any) => boolean;
11 isIterationStatement: (node: any) => boolean;
12 isProblematicIfStatement: (node: any) => boolean;
13 isSourceElement: (node: any) => boolean;
14 isStatement: (node: any) => boolean;
15 trailingStatement: any;
16 };
17 code: {
18 isDecimalDigit: (ch: any) => boolean;
19 isHexDigit: (ch: any) => boolean;
20 isIdentifierPartES5: (ch: any) => boolean;
21 isIdentifierPartES6: (ch: any) => boolean;
22 isIdentifierStartES5: (ch: any) => boolean;
23 isIdentifierStartES6: (ch: any) => boolean;
24 isLineTerminator: (ch: any) => boolean;
25 isOctalDigit: (ch: any) => boolean;
26 isWhiteSpace: (ch: any) => boolean;
27 };
28 keyword: {
29 isStrictModeReservedWordES6: (id: any) => boolean;
30 isIdentifierES5: (id: any, strict: any) => boolean;
31 isIdentifierES6: (id: any, strict: any) => boolean;
32 isIdentifierNameES5: (id: any) => boolean;
33 isIdentifierNameES6: (id: any) => boolean;
34 isKeywordES5: (id: any, strict: any) => boolean;
35 isKeywordES6: (id: any, strict: any) => boolean;
36 decodeUtf16: (lead: any, trail: any) => any;
37 isReservedWordES5: (id: any, strict: any) => boolean;
38 isReservedWordES6: (id: any, strict: any) => boolean;
39 isRestrictedWord: (id: any) => boolean;
40 };
41};