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




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




## Parameters




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




## Returns




* ` this `