Function sljs::ast::build::lit

source · []
pub fn lit<V>(value: V) -> Expression where
    Literal: From<V>, 
Expand description

make a Literal from value

  • lit(2) is 2 in JavaScript
  • lit(true) is true in JavaScript

DO NOT USE this for arrays and objects, use array() and object() instead!