# API Reference
**Classes**
Name|Description
----|-----------
[CFunction](#cfunctions-cfunction)|*No description*
**Structs**
Name|Description
----|-----------
[CFunctionProps](#cfunctions-cfunctionprops)|*No description*
[ExecOptions](#cfunctions-execoptions)|*No description*
## class CFunction
### Initializer
```ts
new CFunction(props: CFunctionProps)
```
* **props** ([CFunctionProps](#cfunctions-cfunctionprops)
) *No description*
* **capture** (Map
) Symbols to capture. __*Optional*__
* **code** (string
) Javascript code to execute. __*Default*__: "true;"
### Properties
Name | Type | Description
-----|------|-------------
**env** | Map
| Environment variables that are expected to be available when the function is executed.
**outfile** | string
| The location of the function bundle (.js file).
### Methods
#### toJson()
```ts
toJson(): any
```
__Returns__:
* any
#### *static* exec(file, options?)
```ts
static exec(file: string, options?: ExecOptions): any
```
* **file** (string
) *No description*
* **options** ([ExecOptions](#cfunctions-execoptions)
) *No description*
* **env** (Map
) Environment variables to bind to the child process. __*Default*__: {}
__Returns__:
* any
## struct CFunctionProps
Name | Type | Description
-----|------|-------------
**capture**? | Map
| Symbols to capture.
__*Optional*__
**code**? | string
| Javascript code to execute.
__*Default*__: "true;"
## struct ExecOptions
Name | Type | Description
-----|------|-------------
**env**? | Map
| Environment variables to bind to the child process.
__*Default*__: {}