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




``` Hack
public function codegenEnum(
  string $name,
  string $enumType,
): Facebook\HackCodegen\CodegenEnum;
```




## Parameters




- ` string $name `
- ` string $enumType `




## Returns




+ [` Facebook\HackCodegen\CodegenEnum `](<class.Facebook.HackCodegen.CodegenEnum.md>)