Pass object literal to handlebars partial

Related to this reply : https://github.com/wycats/handlebars.js/issues/476 You cannot assign new variable on Handlebars template, you must create this object {name: 'steve', age: '40'} on template data.

data.user = {name: 'steve', age: '40'}

on .hbs

{{> myPartial user}}

But you can take a look to private variables : http://handlebarsjs.com/block_helpers.html

---- UPDATE August 2017 ----

With the new let block helper instruction you can create HTML variable to manipulate easier your display logic:

Global JS

// Create a new Global helper, available everywhere
Template.registerHelper('getUser', function () {
  return Meteor.user()
})

Blaze HTML

Use your global helper to retrieve the user into a variable and use it into HTML

{{#let user=getUser}}
  {{#if user}}
    Hi {{user.name}}
  {{else}}
    Please Login
  {{/if}}
{{/let}}

---- UPDATE 2019 ----

Let reopen that question and put it to the next level.

By registering new simple helpers you will be able to create object or array directly from Blaze (so everything you want):

Template.registerHelper('object', function({hash}) {
  return hash;
})
Template.registerHelper('array', function() {
  return Array.from(arguments).slice(0, arguments.length-1)
})

Usage:

{{> myPartial (object name="steve" age=40 array_example=(array true 2 "3"))}}

Will send as context:

 {
   name: 'steve', 
   age: 40,
   array_example: [true, 2, "3"] 
 }