use crate::records::pending_type::PendingType;
use crate::records::table_indexer::TableIndexer;
use crate::records::txn_log::TxnLog;
use crate::type_aliases::type_id::TypeId;
use luaur_common::macros::luau_assert::LUAU_ASSERT;
impl TxnLog {
pub fn change_indexer(
&mut self,
ty: TypeId,
indexer: Option<TableIndexer>,
) -> *mut PendingType {
let new_ty = self.queue_type_id(ty);
unsafe {
let table_type = crate::functions::get_mutable_txn_log::get_mutable_pending_type::<
crate::records::table_type::TableType,
>(new_ty);
if !table_type.is_null() {
(*table_type).indexer = indexer;
}
}
new_ty
}
}