How to use the @typescript-eslint/typescript-estree/dist/ts-estree/ast-node-types.AST_NODE_TYPES 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 / gen / TsCollector.js View on Github external
TsCollector.prototype.processTSModuleBlock = function (ast) {
        for (var _i = 0, _a = ast.body; _i < _a.length; _i++) {
            var stt = _a[_i];
            this.processAST(stt);
            if (stt.type == ast_node_types_1.AST_NODE_TYPES.ExportNamedDeclaration && stt.declaration.type == ast_node_types_1.AST_NODE_TYPES.FunctionDeclaration) {
                var funcName = stt.declaration.id.name;
                this.moduleMap[this.moduleName].funcs[funcName] = 1;
            }
        }
    };
    TsCollector.prototype.processTSModuleDeclaration = function (ast) {
github Halliwood / ts2lua / gen / TsCollector.js View on Github external
TsCollector.prototype.processClassDeclaration = function (ast) {
        var info = { type: ast_node_types_1.AST_NODE_TYPES.ClassDeclaration, name: ast.id.name, properties: {}, funcs: {} };
        for (var _i = 0, _a = ast.body.body; _i < _a.length; _i++) {
            var cbb = _a[_i];
            if (cbb.type == ast_node_types_1.AST_NODE_TYPES.ClassProperty) {
                var cp = cbb;
                var cpInfo = { type: ast_node_types_1.AST_NODE_TYPES.ClassProperty, name: cp.key.name, isStatic: cp.static, varType: cp.typeAnnotation };
                info.properties[cpInfo.name] = cpInfo;
            }
            else if (cbb.type == ast_node_types_1.AST_NODE_TYPES.MethodDefinition) {
                var md = cbb;
                var mdInfo = { type: ast_node_types_1.AST_NODE_TYPES.MethodDefinition, name: md.key.name, isStatic: md.static, returnType: md.value.returnType };
                info.funcs[mdInfo.name] = mdInfo;
            }
        }
        this.classMap[ast.id.name] = info;
        if (this.moduleName) {
            this.classMap[this.moduleName + '.' + ast.id.name] = info;
            this.moduleMap[this.moduleName].classes[ast.id.name] = info;
        }
    };

@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