1 | import * as ts from "typescript";
|
2 | import { IDisabledInterval, RuleFailure } from "./rule/rule";
|
3 | export declare function getSourceFile(fileName: string, source: string): ts.SourceFile;
|
4 | export declare function createCompilerOptions(): ts.CompilerOptions;
|
5 | export declare function doesIntersect(failure: RuleFailure, disabledIntervals: IDisabledInterval[]): boolean;
|
6 |
|
7 | export declare function scanAllTokens(scanner: ts.Scanner, callback: (s: ts.Scanner) => void): void;
|
8 |
|
9 |
|
10 |
|
11 | export declare function hasModifier(modifiers: ts.ModifiersArray | undefined, ...modifierKinds: ts.SyntaxKind[]): boolean;
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export declare function isBlockScopedVariable(node: ts.VariableDeclaration | ts.VariableStatement): boolean;
|
17 | export declare function isBlockScopedBindingElement(node: ts.BindingElement): boolean;
|
18 | export declare function getBindingElementVariableDeclaration(node: ts.BindingElement): ts.VariableDeclaration | null;
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export declare function childOfKind(node: ts.Node, kind: ts.SyntaxKind): ts.Node | undefined;
|
24 |
|
25 |
|
26 |
|
27 | export declare function someAncestor(node: ts.Node, predicate: (n: ts.Node) => boolean): boolean;
|
28 | export declare function isAssignment(node: ts.Node): boolean;
|
29 |
|
30 |
|
31 |
|
32 | export declare function isNodeFlagSet(node: ts.Node, flagToCheck: ts.NodeFlags): boolean;
|
33 |
|
34 |
|
35 |
|
36 | export declare function isCombinedNodeFlagSet(node: ts.Node, flagToCheck: ts.NodeFlags): boolean;
|
37 |
|
38 |
|
39 |
|
40 | export declare function isCombinedModifierFlagSet(node: ts.Node, flagToCheck: ts.ModifierFlags): boolean;
|
41 |
|
42 |
|
43 |
|
44 | export declare function isTypeFlagSet(type: ts.Type, flagToCheck: ts.TypeFlags): boolean;
|
45 |
|
46 |
|
47 |
|
48 | export declare function isSymbolFlagSet(symbol: ts.Symbol, flagToCheck: ts.SymbolFlags): boolean;
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | export declare function isObjectFlagSet(objectType: ts.ObjectType, flagToCheck: ts.ObjectFlags): boolean;
|
54 |
|
55 |
|
56 |
|
57 | export declare function isNestedModuleDeclaration(decl: ts.ModuleDeclaration): boolean;
|
58 | export declare function unwrapParentheses(node: ts.Expression): ts.Expression;
|
59 | export declare function isScopeBoundary(node: ts.Node): boolean;
|
60 | export declare function isBlockScopeBoundary(node: ts.Node): boolean;
|
61 | export declare function isLoop(node: ts.Node): node is ts.IterationStatement;
|
62 | export interface TokenPosition {
|
63 |
|
64 | fullStart: number;
|
65 |
|
66 | tokenStart: number;
|
67 |
|
68 | end: number;
|
69 | }
|
70 | export declare type ForEachTokenCallback = (fullText: string, kind: ts.SyntaxKind, pos: TokenPosition, parent: ts.Node) => void;
|
71 | export declare type ForEachCommentCallback = (fullText: string, kind: ts.SyntaxKind, pos: TokenPosition) => void;
|
72 | export declare type FilterCallback = (node: ts.Node) => boolean;
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 | export declare function forEachToken(node: ts.Node, skipTrivia: boolean, cb: ForEachTokenCallback, filter?: FilterCallback): void;
|
84 |
|
85 | export declare function forEachComment(node: ts.Node, cb: ForEachCommentCallback): void;
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 | export declare function hasCommentAfterPosition(text: string, position: number): boolean;
|
94 | export interface EqualsKind {
|
95 | isPositive: boolean;
|
96 | isStrict: boolean;
|
97 | }
|
98 | export declare function getEqualsKind(node: ts.BinaryOperatorToken): EqualsKind | undefined;
|