UI for Zipcoin Blue

util.d.ts 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. import * as ts from 'typescript';
  2. import { NodeWrap } from './convert-ast';
  3. export * from './control-flow';
  4. export declare function getChildOfKind<T extends ts.SyntaxKind>(node: ts.Node, kind: T, sourceFile?: ts.SourceFile): ts.Token<T> | undefined;
  5. export declare function isTokenKind(kind: ts.SyntaxKind): boolean;
  6. export declare function isNodeKind(kind: ts.SyntaxKind): boolean;
  7. export declare function isAssignmentKind(kind: ts.SyntaxKind): boolean;
  8. export declare function isTypeNodeKind(kind: ts.SyntaxKind): boolean;
  9. export declare function isJsDocKind(kind: ts.SyntaxKind): boolean;
  10. export declare function isThisParameter(parameter: ts.ParameterDeclaration): boolean;
  11. export declare function getModifier(node: ts.Node, kind: ts.Modifier['kind']): ts.Modifier | undefined;
  12. export declare function hasModifier(modifiers: ts.ModifiersArray | undefined, ...kinds: Array<ts.Modifier['kind']>): boolean;
  13. export declare function isParameterProperty(node: ts.ParameterDeclaration): boolean;
  14. export declare function hasAccessModifier(node: ts.ClassElement | ts.ParameterDeclaration): boolean;
  15. export declare const isNodeFlagSet: (node: ts.Node, flag: ts.NodeFlags) => boolean;
  16. export declare const isTypeFlagSet: (type: ts.Type, flag: ts.TypeFlags) => boolean;
  17. export declare const isSymbolFlagSet: (symbol: ts.Symbol, flag: ts.SymbolFlags) => boolean;
  18. export declare function isObjectFlagSet(objectType: ts.ObjectType, flag: ts.ObjectFlags): boolean;
  19. export declare function isModifierFlagSet(node: ts.Node, flag: ts.ModifierFlags): boolean;
  20. export declare function isModfierFlagSet(node: ts.Node, flag: ts.ModifierFlags): boolean;
  21. export declare function getPreviousStatement(statement: ts.Statement): ts.Statement | undefined;
  22. export declare function getNextStatement(statement: ts.Statement): ts.Statement | undefined;
  23. export declare function getPreviousToken(node: ts.Node, sourceFile?: ts.SourceFile): ts.Node | undefined;
  24. export declare function getNextToken(node: ts.Node, sourceFile?: ts.SourceFile): ts.Node | undefined;
  25. export declare function getTokenAtPosition(parent: ts.Node, pos: number, sourceFile?: ts.SourceFile): ts.Node | undefined;
  26. export declare function getCommentAtPosition(sourceFile: ts.SourceFile, pos: number, parent?: ts.Node): ts.CommentRange | undefined;
  27. export declare function isPositionInComment(sourceFile: ts.SourceFile, pos: number, parent?: ts.Node): boolean;
  28. export declare function getWrappedNodeAtPosition(wrap: NodeWrap, pos: number): NodeWrap | undefined;
  29. export declare function getPropertyName(propertyName: ts.PropertyName): string | undefined;
  30. export declare function forEachDestructuringIdentifier<T>(pattern: ts.BindingPattern, fn: (element: ts.BindingElement & {
  31. name: ts.Identifier;
  32. }) => T): T | undefined;
  33. export declare function forEachDeclaredVariable<T>(declarationList: ts.VariableDeclarationList, cb: (element: (ts.VariableDeclaration | ts.BindingElement) & {
  34. name: ts.Identifier;
  35. }) => T): T | undefined;
  36. export declare const enum VariableDeclarationKind {
  37. Var = 0,
  38. Let = 1,
  39. Const = 2
  40. }
  41. export declare function getVariableDeclarationKind(declarationList: ts.VariableDeclarationList): VariableDeclarationKind;
  42. export declare function isBlockScopedVariableDeclarationList(declarationList: ts.VariableDeclarationList): boolean;
  43. export declare function isBlockScopedVariableDeclaration(declaration: ts.VariableDeclaration): boolean;
  44. export declare const enum ScopeBoundary {
  45. None = 0,
  46. Function = 1,
  47. Block = 2
  48. }
  49. export declare function isScopeBoundary(node: ts.Node): ScopeBoundary;
  50. export declare function isFunctionScopeBoundary(node: ts.Node): boolean;
  51. export declare function isBlockScopeBoundary(node: ts.Node): boolean;
  52. export declare function hasOwnThisReference(node: ts.Node): boolean;
  53. export declare function isFunctionWithBody(node: ts.Node): node is ts.FunctionLikeDeclaration;
  54. export declare function forEachToken(node: ts.Node, cb: (node: ts.Node) => void, sourceFile?: ts.SourceFile): void;
  55. export declare type ForEachTokenCallback = (fullText: string, kind: ts.SyntaxKind, range: ts.TextRange, parent: ts.Node) => void;
  56. export declare function forEachTokenWithTrivia(node: ts.Node, cb: ForEachTokenCallback, sourceFile?: ts.SourceFile): void;
  57. export declare type ForEachCommentCallback = (fullText: string, comment: ts.CommentRange) => void;
  58. export declare function forEachComment(node: ts.Node, cb: ForEachCommentCallback, sourceFile?: ts.SourceFile): void;
  59. export interface LineRange extends ts.TextRange {
  60. contentLength: number;
  61. }
  62. export declare function getLineRanges(sourceFile: ts.SourceFile): LineRange[];
  63. export declare function getLineBreakStyle(sourceFile: ts.SourceFile): "\n" | "\r\n";
  64. export declare function isValidIdentifier(text: string): boolean;
  65. export declare function isValidPropertyAccess(text: string): boolean;
  66. export declare function isValidPropertyName(text: string): boolean;
  67. export declare function isValidNumericLiteral(text: string): boolean;
  68. export declare function isSameLine(sourceFile: ts.SourceFile, pos1: number, pos2: number): boolean;
  69. export declare const enum SideEffectOptions {
  70. None = 0,
  71. TaggedTemplate = 1,
  72. Constructor = 2,
  73. JsxElement = 4
  74. }
  75. export declare function hasSideEffects(node: ts.Expression, options?: SideEffectOptions): boolean;
  76. export declare function getDeclarationOfBindingElement(node: ts.BindingElement): ts.VariableDeclaration | ts.ParameterDeclaration;
  77. export declare function isExpressionValueUsed(node: ts.Expression): boolean;
  78. export declare function isReassignmentTarget(node: ts.Expression): boolean;
  79. export declare function getIdentifierText(node: ts.Identifier): string;
  80. export declare function canHaveJsDoc(node: ts.Node): node is ts.HasJSDoc;
  81. export declare function getJsDoc(node: ts.Node, sourceFile?: ts.SourceFile): ts.JSDoc[];
  82. export declare function parseJsDocOfNode(node: ts.Node, considerTrailingComments?: boolean, sourceFile?: ts.SourceFile): ts.JSDoc[];
  83. export declare const enum ImportKind {
  84. ImportDeclaration = 1,
  85. ImportEquals = 2,
  86. ExportFrom = 4,
  87. DynamicImport = 8,
  88. Require = 16,
  89. ImportType = 32,
  90. All = 63,
  91. AllImports = 59,
  92. AllStaticImports = 3,
  93. AllImportExpressions = 24,
  94. AllRequireLike = 18
  95. }
  96. export declare const enum ImportOptions {
  97. ImportDeclaration = 1,
  98. ImportEquals = 2,
  99. ExportFrom = 4,
  100. DynamicImport = 8,
  101. Require = 16,
  102. All = 31,
  103. AllImports = 27,
  104. AllStaticImports = 3,
  105. AllDynamic = 24,
  106. AllRequireLike = 18
  107. }
  108. export declare function findImports(sourceFile: ts.SourceFile, kinds: ImportKind): ts.LiteralExpression[];
  109. export declare function findImports(sourceFile: ts.SourceFile, options: ImportOptions): ts.LiteralExpression[];
  110. export declare function isStatementInAmbientContext(node: ts.Statement): boolean;
  111. export declare function isAmbientModuleBlock(node: ts.Node): node is ts.ModuleBlock;
  112. export declare function getIIFE(func: ts.FunctionExpression | ts.ArrowFunction): ts.CallExpression | undefined;