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




``` Hack
public function addConstants(
  Traversable<Facebook\HackCodegen\CodegenConstant> $constants,
): this;
```




## Parameters




* ` Traversable<Facebook\HackCodegen\CodegenConstant> $constants `




## Returns




- ` this `