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




Add a generic parameter




``` Hack
public function addGeneric(
  string $decl,
): this;
```




## Parameters




+ ` string $decl `




## Returns




* ` this `