Skip to main content

create_null_var_declarator

Function create_null_var_declarator 

Source
pub fn create_null_var_declarator(ident: Ident) -> VarDeclarator
Expand description

Creates a VarDeclarator initialized to null.

Useful when hoisting a variable declaration ahead of its actual assignment, e.g. var x = null; before the value is set later.

§Arguments

  • ident - The identifier for the variable name

§Example

let decl = var_declarator_null_init_factory(my_ident);