How to use the @typescript-eslint/typescript-estree/dist/ts-estree/ast-node-types.AST_NODE_TYPES.TSEnumDeclaration 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 processTSEnumDeclaration(ast: TSEnumDeclaration) {
    let info: TsEnumInfo = { type: AST_NODE_TYPES.TSEnumDeclaration, name: ast.id.name, members: {} };
    for(let em of ast.members) {
      let emInfo: TsEnumMemberInfo = { type: AST_NODE_TYPES.TSEnumMember, name: this.getId(em.id) };
      info.members[emInfo.name] = emInfo;
    }
    this.enumMap[info.name] = info;
  }
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;
    }
  }

@typescript-eslint/typescript-estree

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

BSD-2-Clause
Latest version published 8 days ago

Package Health Score

95 / 100
Full package analysis