How to use the @typescript-eslint/typescript-estree/dist/ts-estree/ast-node-types.AST_NODE_TYPES.TSModuleDeclaration function in @typescript-eslint/typescript-estree

To help you get started, we’ve selected a few @typescript-eslint/typescript-estree examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Halliwood / ts2lua / src / gen / TsCollector.ts View on Github external
private processAST(ast: any) {
    switch(ast.type) {
      case AST_NODE_TYPES.ClassDeclaration:
        this.processClassDeclaration(ast as ClassDeclaration);
        break;
      case AST_NODE_TYPES.TSEnumDeclaration:
        this.processTSEnumDeclaration(ast as TSEnumDeclaration);
        break;
      case AST_NODE_TYPES.ExportNamedDeclaration:
        this.processExportNamedDeclaration(ast as ExportNamedDeclaration);
        break;
      case AST_NODE_TYPES.TSModuleBlock:
        this.processTSModuleBlock(ast as TSModuleBlock);
        break;
      case AST_NODE_TYPES.TSModuleDeclaration:
        this.processTSModuleDeclaration(ast as TSModuleDeclaration);
        break;
      default:
        break;
    }
  }
github Halliwood / ts2lua / src / gen / TsCollector.ts View on Github external
private processTSModuleDeclaration(ast: TSModuleDeclaration) {
    this.moduleName = this.getId(ast.id);
    let info: TsModuleInfo = { type: AST_NODE_TYPES.TSModuleDeclaration, name: this.moduleName, properties: {}, funcs: {}, classes: {} };
    this.moduleMap[this.moduleName] = info;
    this.processAST(ast.body);
    this.moduleName = '';
  }

@typescript-eslint/typescript-estree

A parser that converts TypeScript source code into an ESTree compatible form

BSD-2-Clause
Latest version published 5 days ago

Package Health Score

95 / 100
Full package analysis