Skip to main content

create_array_lit

Function create_array_lit 

Source
pub fn create_array_lit(elems: Vec<Option<ExprOrSpread>>) -> ArrayLit
Expand description

Creates an ArrayLit from a vector of ExprOrSpread.

§Arguments

  • elems - The elements to include in the array literal

§Example

let array_lit = create_array_lit(vec![create_expr_or_spread(value)]);