remove_coupling
Stable function · Editing
Tier: stable · Kind: function · Topic: Editing
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
remove_coupling | removeCoupling | remove_coupling, remove_coupling_from_file | remove_coupling | RemoveCoupling |
Note: spelling differs from the §2 rule: python=remove_coupling_from_file (expected remove_coupling); multiple spellings exported by: python
Julia
remove_coupling(file::EsmFile, index::Int64)
remove_coupling(file::EsmFile, index::Int) -> EsmFile
Remove a coupling entry by index (1-based).
Throws EditError
if the index is out of bounds.
TypeScript
function removeCoupling(file: EsmFile, index: number): EsmFile
Remove a coupling entry from an ESM file by index
Parameters
file— ESM file to remove coupling fromindex— Index of coupling entry to remove
Returns
New ESM file with coupling removed
Throws
- EntityNotFoundError if index is out of bounds
Python
Exported as remove_coupling and remove_coupling_from_file. Both names refer to the same operation.
remove_coupling
remove_coupling(esm_file: EsmFile, index: int, validate_after_edit: bool = True) -> EditResult
Remove a coupling entry from an ESM file.
remove_coupling_from_file
remove_coupling_from_file(esm_file: EsmFile, index: int, validate_after_edit: bool = True) -> EditResult
Deprecated alias for remove_coupling
. Remove a coupling entry from an ESM file.
Rust
pub fn remove_coupling(esm_file: &EsmFile, index: usize) -> EditResult<EsmFile>
Remove a coupling entry from an ESM file by index
Arguments
esm_file- The ESM file to modifyindex- Index of the coupling entry to remove
Returns
EditResult<EsmFile>- New ESM file without the coupling entry