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




``` Hack
public function getConstraint(): ?string;
```




## Returns




- ` ?string `