Skip to main content

create_prop_from_name

Function create_prop_from_name 

Source
pub fn create_prop_from_name(key: PropName, value: Expr) -> PropOrSpread
Expand description

Creates a PropOrSpread from an already-constructed PropName and an expression value.

Use this when the key is an existing PropName (e.g. cloned from another prop), avoiding the need to re-stringify it.