import type { SyntaxNode } from './utils/ast-helpers.js'; import { SupportedLanguages } from '../../_shared/index.js'; import type { FieldExtractorContext, ExtractedFields, FieldVisibility } from './field-types.js'; /** * Language-specific field extractor */ export interface FieldExtractor { /** Language this extractor handles */ language: SupportedLanguages; /** * Extract fields from a class/struct/interface declaration */ extract(node: SyntaxNode, context: FieldExtractorContext): ExtractedFields | null; /** * Check if this node represents a type declaration with fields */ isTypeDeclaration(node: SyntaxNode): boolean; } /** * Base class for field extractors with common utilities */ export declare abstract class BaseFieldExtractor implements FieldExtractor { abstract language: SupportedLanguages; abstract extract(node: SyntaxNode, context: FieldExtractorContext): ExtractedFields | null; abstract isTypeDeclaration(node: SyntaxNode): boolean; protected normalizeType(type: string | null): string | null; protected resolveType(typeName: string, context: FieldExtractorContext): string | null; protected abstract extractVisibility(node: SyntaxNode): FieldVisibility; }