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




``` Hack
public function addTypeConstant(
  Facebook\HackCodegen\CodegenTypeConstant $const,
): this;
```




## Parameters




* [` Facebook\HackCodegen\CodegenTypeConstant `](<class.Facebook.HackCodegen.CodegenTypeConstant.md>)`` $const ``




## Returns




- ` this `