pub struct DeclarationChecker<'a, 'ctx> {
pub ctx: &'a mut CheckerContext<'ctx>,
}Expand description
Declaration type checker that operates on the shared context.
This is a stateless checker that borrows the context mutably. All declaration type checking goes through this checker.
Fields§
§ctx: &'a mut CheckerContext<'ctx>Implementations§
Source§impl<'a, 'ctx> DeclarationChecker<'a, 'ctx>
impl<'a, 'ctx> DeclarationChecker<'a, 'ctx>
Sourcepub const fn new(ctx: &'a mut CheckerContext<'ctx>) -> Self
pub const fn new(ctx: &'a mut CheckerContext<'ctx>) -> Self
Create a new declaration checker with a mutable context reference.
Sourcepub fn check(&mut self, decl_idx: NodeIndex)
pub fn check(&mut self, decl_idx: NodeIndex)
Check a declaration node.
This dispatches to specialized handlers based on declaration kind.
Currently a skeleton - logic will be migrated incrementally from CheckerState.
Sourcepub fn check_variable_statement(&mut self, stmt_idx: NodeIndex)
pub fn check_variable_statement(&mut self, stmt_idx: NodeIndex)
Check a variable statement.
Sourcepub fn check_variable_declaration_list(&mut self, list_idx: NodeIndex)
pub fn check_variable_declaration_list(&mut self, list_idx: NodeIndex)
Check a variable declaration list.
Sourcepub fn check_variable_declaration(&mut self, decl_idx: NodeIndex)
pub fn check_variable_declaration(&mut self, decl_idx: NodeIndex)
Check a variable declaration.
Sourcepub fn check_function_declaration(&mut self, func_idx: NodeIndex)
pub fn check_function_declaration(&mut self, func_idx: NodeIndex)
Check a function declaration.
Sourcepub fn check_class_declaration(&mut self, class_idx: NodeIndex)
pub fn check_class_declaration(&mut self, class_idx: NodeIndex)
Check a class declaration.
Handles declaration-specific class checks including TS2564 (strict property initialization).
Sourcepub const fn check_interface_declaration(&mut self, _iface_idx: NodeIndex)
pub const fn check_interface_declaration(&mut self, _iface_idx: NodeIndex)
Check an interface declaration.
Sourcepub const fn check_type_alias_declaration(&mut self, _alias_idx: NodeIndex)
pub const fn check_type_alias_declaration(&mut self, _alias_idx: NodeIndex)
Check a type alias declaration.
Sourcepub fn check_enum_declaration(&mut self, enum_idx: NodeIndex)
pub fn check_enum_declaration(&mut self, enum_idx: NodeIndex)
Check an enum declaration.
Sourcepub fn check_parameter_properties(&mut self, parameters: &[NodeIndex])
pub fn check_parameter_properties(&mut self, parameters: &[NodeIndex])
Check parameter properties (only valid in constructors).
Sourcepub const fn check_function_implementations(&mut self, _nodes: &[NodeIndex])
pub const fn check_function_implementations(&mut self, _nodes: &[NodeIndex])
Check function implementations for overload sequences.
Source§impl<'a, 'ctx> DeclarationChecker<'a, 'ctx>
impl<'a, 'ctx> DeclarationChecker<'a, 'ctx>
Sourcepub fn check_module_declaration(&mut self, module_idx: NodeIndex)
pub fn check_module_declaration(&mut self, module_idx: NodeIndex)
Check a module/namespace declaration.