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




``` Hack
public function useFunction(
  string $ns,
  ?string $as = NULL,
): this;
```




## Parameters




- ` string $ns `
- ` ?string $as = NULL `




## Returns




+ ` this `