(&self, index: Option<usize>, prop_name: &str, value: CstInputValue)
| 1768 | } |
| 1769 | |
| 1770 | fn insert_or_append(&self, index: Option<usize>, prop_name: &str, value: CstInputValue) -> CstObjectProp { |
| 1771 | self.ensure_multiline(); |
| 1772 | insert_or_append_to_container( |
| 1773 | &CstContainerNode::Object(self.clone()), |
| 1774 | self.properties().into_iter().map(|c| c.into()).collect(), |
| 1775 | index, |
| 1776 | InsertValue::Property(prop_name, value), |
| 1777 | ) |
| 1778 | .as_object_prop() |
| 1779 | .unwrap() |
| 1780 | } |
| 1781 | |
| 1782 | /// Replaces this node with a new value. |
| 1783 | pub fn replace_with(self, replacement: CstInputValue) -> Option<CstNode> { |
no test coverage detected