---
layout: docs
title: addAssignment
id: class.Facebook.HackCodegen.HackBuilder.addAssignment
docid: class.Facebook.HackCodegen.HackBuilder.addAssignment
permalink: /docs/reference/class.Facebook.HackCodegen.HackBuilder.addAssignment/
---
# Facebook\\HackCodegen\\HackBuilder::addAssignment()




``` Hack
public function addAssignment<T>(
  string $var_name,
  T $value,
      IHackBuilderValueRenderer<T> $renderer,
): this;
```




## Parameters




- ` string $var_name `
- ` T $value `
- ` IHackBuilderValueRenderer<T> $renderer `




## Returns




+ ` this `