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




``` Hack
public function setConstraint(
  string $c,
): this;
```




## Parameters




* ` string $c `




## Returns




- ` this `