Skip to main content

luaur_analysis/type_aliases/
component.rs

1//! Node: `cxx:TypeAlias:Luau.Analysis:Analysis/include/Luau/TypePath.h:124:component`
2//! Source: `Analysis/include/Luau/TypePath.h` (TypePath.h:124, hand-ported)
3
4use crate::enums::pack_field::PackField;
5use crate::enums::type_field::TypeField;
6use crate::records::generic_pack_mapping::GenericPackMapping;
7use crate::records::index::Index;
8use crate::records::pack_slice::PackSlice;
9use crate::records::property_type_path::Property;
10use crate::records::reduction::Reduction;
11
12// C++: using Component = Luau::Variant<Property, Index, TypeField, PackField,
13//                                      PackSlice, Reduction, GenericPackMapping>;
14// 7 alternatives — dedicated enum per the Type-SCC convention.
15#[derive(Debug, Clone, PartialEq)]
16pub enum Component {
17    Property(Property),
18    Index(Index),
19    TypeField(TypeField),
20    PackField(PackField),
21    PackSlice(PackSlice),
22    Reduction(Reduction),
23    GenericPackMapping(GenericPackMapping),
24}