# createLexicalScope

```ts
import { createLexicalScope } from "@alloy-js/typescript";


function createLexicalScope(name: string, options?: OutputScopeOptions): TSLexicalScope;
```

## Parameters

|         |                             |   |
| ------- | --------------------------- | - |
| name    | string                      |   |
| options | optional OutputScopeOptions |   |

## Options

|             |                                                           |                                                                                                                                                                               |
| ----------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| binder      | optional[Binder](../../../core/types/binder/)             | The binder instance this scope belongs to. If not provided, it will attempt to find the current binder from context.                                                          |
| metadata    | optional Record\<string, unknown>                         | Arbitrary metadata that is associated with this scope.                                                                                                                        |
| ownerSymbol | optional[OutputSymbol](../../../core/types/outputsymbol/) | The owner symbol of this scope. When provided, this scope becomes a member scope, which exposes the symbols on its owner symbol instead of having its own declaration spaces. |

## Returns

[TSLexicalScope](../../types/tslexicalscope/)
