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




``` Hack
public function setType(
  string $type,
): this;
```




## Parameters




+ ` string $type `




## Returns




* ` this `