# LicenseError Class

> LicenseError class in the TX Sheet Control TypeScript API for the browser, with its syntax, 1 property and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > LicenseError Class
- **429 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/licenseerror/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/licenseerror/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/licenseerror/llms-full.txt

---

Public class for LicenseError.

Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

ES module import: `import { LicenseError } from '@txtextcontrol/tx-sheet-control';`.

### Constructor

```typescript
new LicenseError(code: LicenseErrorCode): Error & { readonly code: LicenseErrorCode; }
```

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `code` | `LicenseErrorCode` | No | Value matching code's declared type and the owning object's validation rules. |

Returns: `Error & { readonly code: LicenseErrorCode; }`.

### Members

#### Properties

| Property | Description |
|---|---|
| [code](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/licenseerror/code-property/llms-full.txt) | The code value of LicenseError. |

### Examples

Pass the LicenseError value obtained from its owning control, collection, callback or operation. The function reads that value without constructing a replacement document object.

```typescript
import type { LicenseError } from '@txtextcontrol/tx-sheet-control';

function inspectLicenseErrorCode(licenseError: InstanceType<typeof LicenseError>) {
    const value = licenseError['code'];
    console.log('LicenseError.code', value);
}
```

### See Also

- [TypeScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## In This Section

- [LicenseError.code Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/licenseerror/code-property/llms-full.txt): LicenseError.code property in the TX Sheet Control TypeScript API for the browser, with its type LicenseErrorCode and a TypeScript example.

---

## Nearby

- **Previous:** [JsonSaveOptions.sheetName Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/jsonsaveoptions/sheetname-property/llms-full.txt)
- **Next:** [LicenseError.code Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/licenseerror/code-property/llms-full.txt)
