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




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




## Parameters




- ` string $type `




## Returns




+ ` this `