@samiyev/guardian
Version:
Research-backed code quality guardian for AI-assisted development. Detects hardcodes, secrets, circular deps, framework leaks, entity exposure, and 9 architecture violations. Enforces Clean Architecture/DDD principles. Works with GitHub Copilot, Cursor, W
126 lines • 3.57 kB
TypeScript
/**
* Abstract Syntax Tree (AST) node type constants
*
* These constants represent tree-sitter AST node types used for code analysis.
* Using constants instead of magic strings improves maintainability and prevents typos.
*
* @see https://tree-sitter.github.io/tree-sitter/
*/
/**
* Class and interface declaration node types
*/
export declare const AST_CLASS_TYPES: {
readonly CLASS_DECLARATION: "class_declaration";
readonly INTERFACE_DECLARATION: "interface_declaration";
};
/**
* Function and method node types
*/
export declare const AST_FUNCTION_TYPES: {
readonly FUNCTION_DECLARATION: "function_declaration";
readonly METHOD_DEFINITION: "method_definition";
readonly FUNCTION_SIGNATURE: "function_signature";
};
/**
* Variable and parameter node types
*/
export declare const AST_VARIABLE_TYPES: {
readonly VARIABLE_DECLARATOR: "variable_declarator";
readonly REQUIRED_PARAMETER: "required_parameter";
readonly OPTIONAL_PARAMETER: "optional_parameter";
readonly PUBLIC_FIELD_DEFINITION: "public_field_definition";
readonly PROPERTY_SIGNATURE: "property_signature";
};
/**
* Type system node types
*/
export declare const AST_TYPE_TYPES: {
readonly TYPE_ALIAS_DECLARATION: "type_alias_declaration";
readonly UNION_TYPE: "union_type";
readonly LITERAL_TYPE: "literal_type";
readonly TYPE_ANNOTATION: "type_annotation";
};
/**
* Statement node types
*/
export declare const AST_STATEMENT_TYPES: {
readonly EXPORT_STATEMENT: "export_statement";
readonly IMPORT_STATEMENT: "import_statement";
readonly LEXICAL_DECLARATION: "lexical_declaration";
};
/**
* Expression node types
*/
export declare const AST_EXPRESSION_TYPES: {
readonly CALL_EXPRESSION: "call_expression";
readonly AS_EXPRESSION: "as_expression";
};
/**
* Field and property node types
*/
export declare const AST_FIELD_TYPES: {
readonly FIELD_DEFINITION: "field_definition";
};
/**
* Pattern node types
*/
export declare const AST_PATTERN_TYPES: {
readonly OBJECT_PATTERN: "object_pattern";
readonly ARRAY_PATTERN: "array_pattern";
};
/**
* Modifier node types
*/
export declare const AST_MODIFIER_TYPES: {
readonly READONLY: "readonly";
readonly STATIC: "static";
readonly CONST: "const";
};
/**
* Special identifier node types
*/
export declare const AST_IDENTIFIER_TYPES: {
readonly IDENTIFIER: "identifier";
readonly TYPE_IDENTIFIER: "type_identifier";
readonly PROPERTY_IDENTIFIER: "property_identifier";
readonly IMPORT: "import";
};
/**
* Node field names used with childForFieldName()
*/
export declare const AST_FIELD_NAMES: {
readonly NAME: "name";
readonly DECLARATION: "declaration";
readonly VALUE: "value";
readonly FUNCTION: "function";
};
/**
* String fragment node type
*/
export declare const AST_STRING_TYPES: {
readonly STRING_FRAGMENT: "string_fragment";
};
/**
* Common JavaScript timer functions
*/
export declare const TIMER_FUNCTIONS: {
readonly SET_TIMEOUT: "setTimeout";
readonly SET_INTERVAL: "setInterval";
};
/**
* Value pattern types for pattern matching
*/
export declare const VALUE_PATTERN_TYPES: {
readonly EMAIL: "email";
readonly API_KEY: "api_key";
readonly URL: "url";
readonly IP_ADDRESS: "ip_address";
readonly FILE_PATH: "file_path";
readonly DATE: "date";
readonly UUID: "uuid";
readonly VERSION: "version";
readonly JWT: "jwt";
readonly MAC_ADDRESS: "mac_address";
readonly BASE64: "base64";
};
//# sourceMappingURL=ast-node-types.d.ts.map