---
layout: docs
title: codegenType
id: interface.Facebook.HackCodegen.ICodegenFactory.codegenType
docid: interface.Facebook.HackCodegen.ICodegenFactory.codegenType
permalink: /docs/reference/interface.Facebook.HackCodegen.ICodegenFactory.codegenType/
---
# Facebook\\HackCodegen\\ICodegenFactory::codegenType()




Generate a ` type ` declaration




``` Hack
public function codegenType(
  string $name,
): Facebook\HackCodegen\CodegenType;
```




This is a transparent type alias.




## Parameters




+ ` string $name `




## Returns




* [` Facebook\HackCodegen\CodegenType `](<class.Facebook.HackCodegen.CodegenType.md>)